Automatically generate permalinks

2 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 11, 2019   (RSS)

By daniel - June 11, 2019

Hi Greg,

By default the auto-populate functionality only works on CMSB admin pages, so on front-end user pages, you'll need to add some code to create and save the permalink. Luckily you can use the permalink_generate() function to create it based on your auto-populate rules. Here's its usage:

<?php
 $permalinkText = permalink_generate($_REQUEST, $permalinkPrefix);
?>

$permalinkPrefix is optional; if you do not use a prefix for your permalinks you can omit it. You can then save $permalinkText as the permalink field for the user's new listing.

Let me know if you have any questions!

Thanks,

Daniel
Technical Lead
interactivetools.com