I have set up to ways for the customer to brows around the products - one by manufacturer and one by category. Both are menu items in the main menu.
Since latest versions of VM, we are now able to to select manufacturers in the Category Layout and by this way, a menu item under we can have all the manufacturers in our shop and all the products listed on the manufacturer's page. That is great! Thanks Max.
So, what is my issue with this? Well, I want to edit the Manufacturer's and the Categories pages "Page Title" and "Meta Description". In the same way as under products details. (There are boxes to fill in for that)
We go on, I start editing a Menu Item for a Manufacturer, under the "Page Display" tab. I fill in the text in the box for "Browser Page Title", save, clear the cache and then reload the current page from front end. Nothing. Zero changes. Still the title displayed in the browser and in the source, the same of course.
Is it simply not working, or am I doing something wrong?
Anyone, any ideas?
There is a hierarchy of which set title is used
i.e. if title x is filled then it take precedence over others
check the code in components\com_virtuemart\views\category\view.html.php from line ~ 340
search backwards from $document->setTitle( $title ); ~ 430
it is a hack but I regularly change this code to get the auto html titles I want ( normally from concatenating cat names from the category structure and the set cat metas)
Thanks GJC. That is something I probably won't be able to do by myself. Out of scope of my coding knowledge. :(
I think I need to wish it will become a feature in future VM versions.
@max - I might contribute with some € to the "Virtuemart club" to make this happen.
Cheers
/Dodo
It's more just the sequence or hierarchy of which configured html Title takes precedence.
I guess every user will have their own ideas which it should be
I would tend to the menu metas being top dog but I know many VM builders don't use Joomla menus at all for cats etc
there is already category metas but then how do u differentiate between the manufacturer filtered cat and the full cat?
YOu can always force the document title in the tmpl/default.php file
You can check and Copy the view.html code
the base
$title =$XXX;
$document = JFactory::getDocument();
$document->setTitle( $title );
$XXX is the value you want as title.
Quote from: Studio 42 on December 04, 2016, 22:24:52 PM
YOu can always force the document title in the tmpl/default.php file
You can check and Copy the view.html code
the base
$title =$XXX;
$document = JFactory::getDocument();
$document->setTitle( $title );
$XXX is the value you want as title.
Hmm,
sorry Studio42, I don't quite get that. Could you please be a bit more specific? (It might be very specific, but I still don't get it ;) )
Though it looks very easy...
Cheers
The title is set in view.html.php
For the category view for eg.
But the template file YOURSITE\components\com_virtuemart\views\category\tmpl\default.php
or YOURSITE\templates\YOURTEMPLATE\com_virtuemart\views\category\default.php is loaded after.
So you can change the title in this file to overide default one.
using
$title = vmText::_($this->category->category_name);
to set category name.
But this is only an exemple and you can add more text, as shop name vendor name ....
Anyone that can help me achieve this? Physically introduce me how to do? I don't understand if this is some procedure I have to do on every manufacturer page or "central" in one file? (Override?)
Of course I have to pay something for your time.
P.M. me then, please.