Front-End Editing and Permalinks
11 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: August 14, 2014 (RSS)
By Perchpole - August 14, 2014
Greg -
I added this to save.php to create the new page name:
$_REQUEST['permalink'] = $colsToValues['permalink']."-".$newRecordNum;
Then, if the user edits the page, I added this to edit.php:
$string = strtolower($_REQUEST['name']);
$string = preg_replace("/[^a-z0-9_\s-]/", "", $string);
$string = preg_replace("/[\s-]+/", " ", $string);
$_REQUEST['permalink'] = preg_replace("/[\s_]/", "-", $string);
Works really well!
Thanks for your help,
:0D
Perchpole