Keyword

Help with SEO / Pagination

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 2 months ago #156273 by Krikor Boghossian
Replied by Krikor Boghossian on topic Help with SEO / Pagination

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
8 years 2 months ago #156276 by Joe Campbell
Replied by Joe Campbell on topic Help with SEO / Pagination
Thanks @Krikor, you're the best - two things:

1) I do not know Regex

2) Would such a modification have a negative impact on the rel next and previous links produced by ones SEF extension?

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

More
8 years 2 months ago #156279 by Ioannis Toutoulis
Replied by Ioannis Toutoulis on topic Help with SEO / Pagination

Joe Campbell wrote: I am no developer, but I would think the code would look more like this...


$doc = JFactory::getDocument();
$pagdata = $this->pagination->getData();

if ($pagdata->next->link) {
$doc->addCustomTag('<link rel="next" href="'.$pagdata->next->link.'" />');
}

if ($pagdata->previous->link) {
$doc->addCustomTag('<link rel="prev" href="'.$pagdata->previous->link.'" />');
}


More on the subjectL

Google treats rel="previous" as a syntactic variant of rel="prev". Values can be either relative or absolute URLs (as allowed by the <link> tag). And, if you include a <base> link in your document, relative paths will resolve according to the base URL.

source: support.google.com/webmasters/answer/1663744?hl=en


No Joe, you don't have to write the code like that.

The addHeadLink method does the trick and gives the output as it should be.

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

More
8 years 2 months ago #156281 by Joe Campbell
Replied by Joe Campbell on topic Help with SEO / Pagination
Thanks @IoannisToutoulis

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 2 months ago #156288 by Krikor Boghossian
Replied by Krikor Boghossian on topic Help with SEO / Pagination
@Joe This pattern can be used for other extensions as well since all the paginated URLs share the same pattern.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
8 years 2 months ago #156293 by Joe Campbell
Replied by Joe Campbell on topic Help with SEO / Pagination
@Krikor - I apologize for not explaining properly, Let me try again:

The regex will modify the URL structure (URL in address bar), but what would you see if you reviewed the source code to view the meta data (canonical and rel previous/next)? Would the htaccess modification also change the meta data?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 2 months ago #156308 by Krikor Boghossian
Replied by Krikor Boghossian on topic Help with SEO / Pagination
No it won't alter any part of your site apart from the URL pattern.
However the link in the prev/ next links will display non-SEF links.
I do not know how this will affect your SEO in terms of double content.

I know this is a longshot but you ask how www.firecoders.com/extensions/route-66 handle paginated URLs.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum