News:

Support the VirtueMart project and become a member

Main Menu

Index Follow Category

Started by fabioweb, October 17, 2017, 23:19:50 PM

Previous topic - Next topic

fabioweb

Hello,
is it possible to setup this with noindex,follow
and this url with "index,follow" ?

In short these are the same product page but i need different robots managment 

Thank you

Studio 42

If you need to do this, you have to use condition.
sample code using categories (to modify for your needs) :

$document = JFactory::getDocument();
If ($cat_id == "XXX") $document->setMetaData('robots','noindex,follow');
else $document->setMetaData('robots','index,follow');

But of course in this case all product in same category have same meta robots, so you need perhaps use a product id and cat id filter.

fabioweb

Thank you for your help.. Where i need to insert the code?

Regards

Studio 42

In your product page JOOMLAROOT/templates/YOURTEMPLATE/html/virtuemart/productdetails/default.php
But is i said, it's not complete and need some more work.
It's possible to write a system plugin too, to check category+product, bit is longer to do.