How do I go about adding meta keywords and descriptions to a Chronoform in Joomla!
The form code doesn't contain a header tag. Just the code for the form, not the whole page.
Thank you in advance.
Louise
The form code doesn't contain a header tag. Just the code for the form, not the whole page.
Thank you in advance.
Louise
Anyone got any ideas please?
It just comes up with Joomla! in the meta keywords and description.
Thanks,
Louise
It just comes up with Joomla! in the meta keywords and description.
Thanks,
Louise
Hi Louise,
You can of course change them for the whole site in Global Configuration | Site | MetaData Settings.
If you want to change them for the single ChronoForm then include this PHP in the Form HTML on the Form Code tab.
Bob
You can of course change them for the whole site in Global Configuration | Site | MetaData Settings.
If you want to change them for the single ChronoForm then include this PHP in the Form HTML on the Form Code tab.
<?php
// workaround for ChronoForms bug
if ( !$mainframe->isSite() ) { return; }
$doc =& JFactory::getDocument();
$doc->setDescription ('description-string, 'title-string');
// general version
$doc->setMetaData( 'tag-name', 'tag-content', true );
// for example . . .
$doc->setMetaData('keywords', 'META, meta element, metadata, metainformation, meta data');
$doc->setMetaData('robots', 'noindex, follow');
// and so on
?>
Bob
Hi Bob,
Thank you very much.
I have put the code into the top of the form code and I now get an error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/wasing/public_html/components/com_chronocontact/chronocontact.html.php(141) : eval()'d code on line 10
Joomla Professional Work
Thank you very much.
I have put the code into the top of the form code and I now get an error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/wasing/public_html/components/com_chronocontact/chronocontact.html.php(141) : eval()'d code on line 10
Joomla Professional Work
Thanks Bob.
All working now.
All working now.
Thanks Bob.
All working now.
Hi, I am gettting Parse error: syntax error message on my form.
here is the code on my html code.
<?php
// workaround for ChronoForms bug
if ( !$mainframe->isSite() ) { return; }
$doc =& JFactory::getDocument();
$doc->setDescription ('Glasgow computer repair, 'Home visit');
$doc->setMetaData( 'tag-name', 'tag-content', true );
// for example . . .
$doc->setMetaData('glasgow pc repair, west end, east glasgow');
$doc->setMetaData('robots', 'noindex, follow');
?>
Is there anything I am doing wrong, please help. Thanks
This topic is locked and no more replies can be posted.