Keyword

Help with SEO / Pagination

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 2 months ago #156009 by Krikor Boghossian
Replied by Krikor Boghossian on topic Help with SEO / Pagination
You can override the pagination -> docs.joomla.org/Understanding_Output_Overrides#Ancillary_Customisation:Pagination but I do not know if you can also change the URL pattern successfully via an override.

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

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

  • Lee Collings
  • Lee Collings's Avatar Topic Author
  • Offline
  • New Member
More
8 years 2 months ago #156011 by Lee Collings
Replied by Lee Collings on topic Help with SEO / Pagination
I can't find any extensions that allow this, and there seems to be extremely little documentation or web sites out there that have even touched on this issue.

If you're able to provide some links to extensions that will solve this issue, that aren't paid for, I'd really appreciate it.

I'm still very surprised and disappointed that this simple feature seems to be completely left out of Joomla core functionality. Especially as in the Global Configuration there's a setting to 'Enable SEF URLs' that states:

Search engine friendly (SEF), human-readable or clean URLs are URLs that make sense to both humans and search engines because they explain the path to the particular page they point to.


This option should technically apply to pagination links too, in my opinion.

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

  • Lee Collings
  • Lee Collings's Avatar Topic Author
  • Offline
  • New Member
More
8 years 2 months ago #156013 by Lee Collings
Replied by Lee Collings on topic Help with SEO / Pagination
Thanks for the link, but it doesn't give any information on Pagination, as it says 'We'll look into this later'.

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 #156015 by Krikor Boghossian
Replied by Krikor Boghossian on topic Help with SEO / Pagination
I have to remind you that this is the forum for K2.
For core Joomla! issues you have to address them on Joomla!'s forums.

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 - 8 years 2 months ago #156227 by Ioannis Toutoulis
Replied by Ioannis Toutoulis on topic Help with SEO / Pagination
I had the exact same issue and i solved with this code in category.php K2 template override. As Krikor said pagination is Joomla's functionality so i think you have to do something like this:

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

if ($pagdata->next->link) {
$doc->addHeadLink( $pagdata->next->link, 'next');
}

if ($pagdata->previous->link) {
$doc->addHeadLink( $pagdata->previous->link, 'prev');
}

This will not change the url but now google can see which page is next or prev.
Last edit: 8 years 2 months ago by Ioannis Toutoulis.

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 #156231 by Krikor Boghossian
Replied by Krikor Boghossian on topic Help with SEO / Pagination
Thank you for sharing this Ioannis :)

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 #156235 by Joe Campbell
Replied by Joe Campbell on topic Help with SEO / Pagination
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

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

More
8 years 2 months ago #156261 by Joe Campbell
Replied by Joe Campbell on topic Help with SEO / Pagination
I never noticed this before, but my paginated pages display "limit" and "start" in the URL:
?limit=12&start=24

While other K2 sites, such as the JoomlaWorks blog paginated pages display:
?start=6

Why is this? Is this a K2 thing? How can I get a simple /page-2 instead?

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 #156267 by Krikor Boghossian
Replied by Krikor Boghossian on topic Help with SEO / Pagination
The url pattern unfortunately is controlled by Joomla!.
To change the generated URLs you will need an SEO extension.

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 #156271 by Joe Campbell
Replied by Joe Campbell on topic Help with SEO / Pagination
Thanks @Krikor any idea why my pattern is different for the JoomlaWorks blog pattern? Both sites are K2

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


Powered by Kunena Forum