I received a notice from Google that pages with details of manufacturers are not mobile friendly.
After I checked, I found that Google was referring to the pages that ended with "?tmpl=component". For example:
https://demo.virtuemart.net/manufacturers/istraxx?tmpl=component
These pages open independently and not according to the site's design.
Where the problem comes from:
Normally these pages are opened by popup. But Google indexes them and it's not a good idea to stop indexing.
The problem is that these pages do not contain meta id "viewport".
To solve the described problem, I added to:
/templates/theme_name/html/com_virtuemart/manufacturer/details.php
The following:
$document = JFactory::getDocument();
$document->addCustomTag('<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1">');
Please share if someone has a better idea.
Hi,
the popup is normally opened in your templates component.php which shows no modules and other unwanted stuff in a popup.
You might want to add these things to your component.php itself, it should be already there in a good template.
Regards
Stefan
Hi Stefan,
Thank you for your advice.
You are absolutely right. It must be there, but it is not.
I do not want to tell which company the template is, but I had to rewrite it all to work properly. This one with a component.php I obviously missed it.
Now everything is OK.
Thank you and best regards,
Ventsi
Because it's a modal, add a robots.txt rule to prevent google to index and verify this files.
or modify the link(use nofollow,noindex ... for eg.)
Your tmpl=component should ALWAYS be noindex
your template/component.php
$doc =JFactory::getDocument();
$doc->setMetaData( 'robots', 'noindex' );
Thanks everyone for the tips.
I added the following:
$doc->setMetaData('robots', 'noindex, nofollow, noarchive, nosnippet');