2

I need to set the article title as page title. Please, note that my articles are not menu items because my menu is built on a custom module. Please, advise. Thank you.

3
  • 1
    and what is your current page title? is it other than your article title?
    – FFrewin
    Commented Dec 7, 2016 at 10:30
  • my current page title in the articles is the main page title, on all articles
    – manton
    Commented Dec 8, 2016 at 12:12
  • @manton please progress this page to a system-recognized resolution. Commented Feb 6, 2019 at 21:03

2 Answers 2

3

You can create a plugin for this event:

onContentPrepare

and code something like:

$doc = JFactory::getDocument();
$doc->setTitle( $article->title);

I can give you a more elaborated code if you needed.

2
  • 1
    Yes, I 'd be grateful if you did, because I am not an expert on coding. Where should I place that code? Thank you very much for your interest.
    – manton
    Commented Dec 8, 2016 at 12:14
  • @Piero please respond to the above comment. Commented Feb 6, 2019 at 21:01
0

You can change the page title in Backend Global Configuration. The URL is

/administrator/index.php?option=com_config

if you want to define the separator check: Where can I configure the page title separator from "-" to "|"?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.