Author Topic: Page titles do not append the site name, if defined so in J global configuration  (Read 173 times)

arcturus

  • Beginner
  • *
  • Posts: 22
  • VirtueMart Version: 3.5.0
Hello everyone,

I see that VM page titles do not take into consideration the settings made in global configuration in Joomla (append site name before or after the current page title).
Cheers,
George
https://www.proxima-mundi.ro

Now I'm using Joomla! 3.9.11 and VM 3.5.0 10097 on PHP 7.3

Ventsi Genchev

  • Jr. Member
  • **
  • Posts: 274
    • Audio Store
Somewhere in the forum described what should be done. I don't remember which post exactly, but I did it according to my needs.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2927
  • VirtueMart Version: 3.6.0
Correct it does not do this - you need a page override

In category default.php

Code: [Select]
//Overrides the meta page title set int the view.html
$Jconfig = JFactory::getConfig();
$qsitename = $Jconfig->get('sitename');
$document = JFactory::getDocument ();

//adds title of category name with sitename
$document->setTitle($this->category->category_name . ' - '. $qsitename);

//could use existing title and append sitename - which would cater for manual entry
//$document->setTitle($document->title . ' - '. $qsitename);

regards
A

Joomla 3.9.8
php 7.1

arcturus

  • Beginner
  • *
  • Posts: 22
  • VirtueMart Version: 3.5.0
I use that, but it is something that should be modified in the core, for all pages involved (not only categories and products, but also checkout, my orders etc.)
Cheers,
George
https://www.proxima-mundi.ro

Now I'm using Joomla! 3.9.11 and VM 3.5.0 10097 on PHP 7.3

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2927
  • VirtueMart Version: 3.6.0
Quote
but it is something that should be modified in the core, for all pages involved (not only categories and products, but also checkout, my orders etc.)

But for some - this is not what would be wanted as it would reduce the readability of product name

There is no need to add to checkout or my orders - they are never referenced anywhere so the click through advantage is meaningless

regards
A

Joomla 3.9.8
php 7.1