-
- 5,888 Posts
you can try to add this lines:
$pagetitle=$doc->get('pagetitle');
$alias = $doc->cleanAlias($pagetitle);
$doc->set('alias',$alias);
like that:
$allFormFields = $hook->getValues();
foreach ($allFormFields as $field=>$value)
{
if ($field !== 'spam' && $field !== 'resource_id'){
$doc->set($field, $value);
}
}
$pagetitle=$doc->get('pagetitle');
$alias = $doc->cleanAlias($pagetitle);
$doc->set('alias',$alias);
$doc->set('template', '1');
$doc->save();
-
- 126 Posts
Hi Bruno,
Thanks so much!
Tested and working perfectly...
Alsonoticed thar unlike evolution, Revolution auto sanitizes these aliases. Happy Happy.
Stuart