good morning
I need to insert the meta tags on my contact page.
unfortunately Joomla does not take the metatags that I entered in the menu item but the generic ones of the site.
how can I see the ones I've included in the menu item?
No idea. You could always add them in custom HTML block I suppose.
I tried to do it with different code found online but I can not replace it correctly.
what should I put in the custom HTML field?
this is what I tried to put in the Custom HTML field
<?php
if ($form->data['LongTitle']) {
$document = JFactory::getDocument();
$document->setTitle($form->data['LongTitle']);
}
if ($form->data['MetaDescription']) {
$document = JFactory::getDocument();
$document->setDescription($form->data['MetaDescription']);
}
if ($form->data['MetaKeywords']) {
$document = JFactory::getDocument();
$document->setMetaData('keywords', $form->data['MetaKeywords']);
}
?>
Hi mr.fifteen,
ChronoForms v6 doesn't use $form->data (v5 did). Instead use $this->data - there is a FAQ with more info (or the manual has some).
Bob
yeah I won...
this is the code to put in a Custom HTML
<?php
$menu = JFactory::getApplication()->getMenu()->getActive();
$doc = JFactory::getDocument();
$config = JFactory::getConfig();
$doc->setTitle( $menu->title . " - " . $config->get('sitename'));
$doc->setDescription( $menu->params->get('menu-meta_description') );
$doc->setMetaData( 'keywords',$menu->params->get('menu-meta_keywords') );
?>