Meta title tag help

cruser 28 Mar, 2024
Anyone know how to change the title tag in the browser? I found the following code:

<?php 
$document =& JFactory::getDocument();
$document->setTitle("Here is my title");
$document->setDescription("Here my description");
?>


How do I get "Here is my title" to show something like {var:Read.name}?
Max_admin 06 Apr, 2024
Answer
use the PHP version:

$this->get("Read.name")
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cruser 08 Apr, 2024
Like this?

<?php 
$document =& JFactory::getDocument();
$document->setTitle("$this->get("Read.name")");
$document->setDescription("Here my description");
?>
Max_admin 08 Apr, 2024
no, remove the double quotes:

<?php 
$document =& JFactory::getDocument();
$document->setTitle($this->get("Read.name"));
$document->setDescription("Here my description");
?>
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cruser 08 Apr, 2024
1 Likes
You're fantastic, Max.  Thank you!
You need to login to be able to post a reply.