How to configure dynamic <title> using placeholders

Hi,

I aummse you are tying to set it in a php plugin for the form, but this si not a place holder issue... or even a Fabrik one... it's how HTTP and HTML work....

The title is set in the HEAD of the document before the document content in processed. So, to "change" it, you would have to either redirect (not optimal), or modify your template index.php file to get the value from your Fabrik table and add it to the title on render. I don't know all you specifics, but something like:

PHP:
$app = JFactory::getApplication();
$input  = JFactory::getApplication()->input;
$rowid = $input->get(rowid');
 
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query
      ->select($db->quoteName(array('id', 'my_title_value')))
      ->from('my_fabrik_table')
      ->where('id = ' . $db->quote($rowid));
  $db->setQuery($query);
  $row = $db->loadAssoc();
  $titleValue= $row['my_title_value'];

Then find the <title> element in the same template index.php file and add or overwrite it such as this:

PHP:
<title><?php echo $currentTile.' - '.$titleValue ?></title>

If you don't want to have to worry about it getting overwritten later... override your template first as per here and p0int your site to your copy.

Regards,
Dale
 
Glad to help... not going to add this the the Fabrik wiki though because it's all standard Joomla/HTML stuff (nothing Fabrik specific). The title portion happens to be coming from Fabrik data in this case - but it could be coming from anywhere else and still apply... so there is no real wiki page specific to Fabrik to put something like this.

Dale
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top