Meta Data in Forms gone

danse 22 Dec, 2015
Hi,
if I set some meta datas in Menülink they wont show up.
Your Forms show global meta data.

what can i do?
have this with both of the Forms i've made over chronoforms.

Maybe i can load form via {} into a article page?
see screenshots
GreyHead 24 Dec, 2015
Hi danse,

Interesting I had always assumed that the Menu code handled the meta-data display - it doesn't :-(

If you add code like this to a Custom Code action in the form On Load event it seems to do the job OK
<?php
$app = \JFactory::getApplication();
$menu = $app->getMenu()->getActive();
if ( !is_object($menu) ) {
  return;
}
$meta_keywords = $menu->params->get('menu-meta_keywords', '');
$jdoc = \JFactory::getDocument();
if ( !empty($meta_keywords) ) {
  $jdoc->setMetadata('keywords', $meta_keywords);
}
$meta_description = $menu->params->get('menu-meta_description', '');
if ( !empty($meta_description) ) {
  $jdoc->setDescription($meta_description);
}
/*$title = $menu->title;
if ( !empty($title) ) {
  echo "<h2>{$title}</h2>";
}*/
?>
Note that the commented out bit at the end displays the menu title as a header.

Bob
danse 24 Dec, 2015
awesome.

Thank you!

Will it be fixed in further Versions?

happy christmas!
GreyHead 25 Dec, 2015
HI danse,

I don't know, it hasn't come up here before so I doubt that it is on Max's To Do list - certainly not at the top.

You can add code directly to your form without using the menu settings if you wish
<?php
$jdoc = \JFactory::getDocument();
$jdoc->setMetadata('keywords', 'some list of words here);
$jdoc->setDescription('Add description here');
?>

Bob
Max_admin 05 Jan, 2016
Hi,

There is also a "Meta tagger" action under the "Joomla" actions group in the "setup" section.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.