Pagination SEO

  • Posts: 265
  • Thank you received: 1
10 years 4 months ago #178081

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- Error-message(debug-mod must be tuned on) -- : none

Hello,

I want to include rel="next" and rel="prev" on my listing pages, but I don't know where these tags need to be placed. Can anyone please help?

Thanks,
Hal

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 4 months ago #178104

Hello,
To do that you'll have to edit the files of the "product" view of your front-end template via "Hikashop->Display->Views".
Note that we'll need more information about where do you exactly want your code to be added if you want more details about how to do it.

Please Log in or Create an account to join the conversation.

  • Posts: 265
  • Thank you received: 1
10 years 4 months ago #178266

Hello Mohamed,

Thanks for your reply. I would like it on all the category pages with pagination.

i.e. /womensshoes or /mensshoes and all the 'brands' pages.

I've had a look and I think I may need to make changes to the category/listing.div

I look forward to you reply.

Kind Regards,
Hal

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 4 months ago #178292

Hello,
If you want to edit the pagination html code you'll have 2 solutions :
1. Create a plugin based on the "onAfterRender" trigger and which will check if you have a pagination on your page and then replace/add the html code "rel=next/prev"
2. Directly edit your Joomla file to add the html code : "rel=next/prev"

Please Log in or Create an account to join the conversation.

  • Posts: 265
  • Thank you received: 1
10 years 4 months ago #178471

Good Morning,

Thank you for your reply. I thought there would be an easy fix. I have no idea how to go about implementing either of those options :(.

Is this a Joomla limitation rather than hikashop? Do you know of any publication that will help me do this?

Thanks,
Hal

Please Log in or Create an account to join the conversation.

  • Posts: 83541
  • Thank you received: 13516
  • MODERATOR
10 years 4 months ago #178501

Hi,

I think that Mohamed didn't understand your question.

The prev/next can be added to the previous and next links of the pagination without too much issue by changing for example the code:

$html .= "<a class=\"pagenav_previous_chevron\" onclick=\"javascript: document.adminForm".$this->hikaSuffix.$this->form.".limitstart".$this->hikaSuffix.".value=".$list['previous']['base']."; document.adminForm".$this->hikaSuffix.$this->form.".submit();return false;\"> &lt; </a>";
to:
$html .= "<a rel=\"prev\" class=\"pagenav_previous_chevron\" onclick=\"javascript: document.adminForm".$this->hikaSuffix.$this->form.".limitstart".$this->hikaSuffix.".value=".$list['previous']['base']."; document.adminForm".$this->hikaSuffix.$this->form.".submit();return false;\"> &lt; </a>";
in administrator/components/com_hikashop/helpers/pagination.php

however, as the pagination is handled with a form (that's because we use the Joomla way of having a pagination), I don't think that it will help.

Please Log in or Create an account to join the conversation.

  • Posts: 265
  • Thank you received: 1
10 years 4 months ago #178683

Thanks Nicolas,

I have put this code in and also \"next\"

I think it has worked.

Kind Regards,
Hal

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
6 years 5 months ago #299600

is this solution still valid?

Last edit: 6 years 5 months ago by Jimmy Business.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
6 years 5 months ago #299603

This doesn’t seem to work anymore on latest Hikashop version?

Ive tried this solution but nothing happend. The rel next/prev does not appear in sourch code.

Ive attached a screenshot.

Ive added the file: pagination.php around line 109.

Could you please help me out to fix this??

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83541
  • Thank you received: 13516
  • MODERATOR
6 years 5 months ago #299604

Hi,

Yes, this is still valid.
However, if your template has a pagination override, you might have to do that in the pagination override of the template (please check the file templates/YOUR_TEMPLATE/html/pagination.php).
Also, this thread is about the next/previous buttons of the listings. Not about the next/previous button you can have on the product page itself.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
6 years 5 months ago #299716

Im using regular protostar template, not having an override.

Im not talking about the next and prev in the productpage. Im talking about the pagination on the productlisting.

I did exactly what you suggest in this post, as you can see on the attached picture. But the rel next prev aint visible in the source code. Thats why i posted my question...

Please Log in or Create an account to join the conversation.

  • Posts: 83541
  • Thank you received: 13516
  • MODERATOR
6 years 5 months ago #299737

Hi,

Then, can you provide a link to the listing page with the pagination ?

Please Log in or Create an account to join the conversation.

Time to create page: 0.098 seconds
Powered by Kunena Forum