Forums

Meta data in joomla article

proso 04 Feb, 2013
Hello,

I'm using the 'submit article' action, which works great. Now I'm trying to add the meta discription and keywords aswell, but there is no field for it and I can't find any example of it in the forum.

How can this be added?
GreyHead 05 Feb, 2013
Hi proso
,

Use a Custom Code action before the Submit Article action to set whatever other values you need:
<?php
$form->data['metadesc'] = 'xxx';
$form->data['metadata'] = 'yyy';
?>


Bob
proso 06 Feb, 2013
Thanks, I used
<?php
$form->data['metadesc'] = 'xxx';
$form->data['metakey'] = 'yyy';
?>


and that works great 😀 😀 ! But how can I assign a database field to the 'xxx' and 'yyy'?

(sorry for the noob question)
GreyHead 06 Feb, 2013
Hi proso,

<?php
$form->data['metadesc'] = $form->data['some_input_name'].', xxx, '.$form->data['another_input_name'];
?>

Bob
proso 07 Feb, 2013
Thanks, I understand now, and it works great!
This topic is locked and no more replies can be posted.