S
S
strify_252017-09-05 10:52:16
Joomla
strify_25, 2017-09-05 10:52:16

How to make canonical links on joomshopping pagination pages?

Catalog category pages have an address like /parfumeriya.html?start=100 The
canonical link should be /parfumeriya.html
I found the code that adds the canon. link (insert in category_default.php):

<?php $document = JFactory::getDocument(); $docstart = JRequest::getInt('start',0); $docroute = rtrim(JURI::root(), '/').JRoute::_('index.php?option=com_jshopping&controller=category&task=view&category_id=' . $this->category->category_id . ''); if($docstart > 0) { $document->addHeadLink($docroute, 'canonical', 'rel', ''); }?>

But the link is /catalog/parfum/ , which doesn't work for me.
Are there any other solutions?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question