Suggestion for improvement to Permalinks plugin

By pault - August 18, 2016

I've used the Permalinks plugin on a number of projects now and think that a great feature would be to enable the specification of a prefix to the edittable permalink on a per section basis.

Typically, an 'about us' page on the site might have the URL http://www.sitename.com/about-us/ and news page might be http://www.sitename.com/news/.  However, when an article is set-up that is linked to from the news page, it would be good to have the permalink as http://www.sitename.com/news/article-name/ but the only way I can see to do this is by getting the user to enter the full news/article-name in the Permalink field.  I think it would be good if for these news articles, that it could be specified that the 'news/' part of the Permalink was already prepended (and not edittable).

Maybe this feature already exists and I've missed it but if not then please consider it for future.

Thanks, Paul.

By JeffC - August 19, 2016

If I've understood correctly this is already possible. In the section editor permalinks field set the default value to news/ 

Jeff

By pault - August 19, 2016

Thanks for the reply.

I've seen a section called field add ons which has a before and after and looks like it could do what I need but I've tried entering a value in the before and it doesn't save this in the Permalinks DB.

By gregThomas - August 19, 2016

Hi Paul, 

I've attached a screenshot that shows you which field you need to add the prefix to when editing/adding the permalink field, in this example I'm adding the prefix blog/ to my Blog section. 

When creating a record, if the user leaves the permalink field blank, the automatically generated permalink will be prefixed with the default value.

Thanks,

Greg

Greg Thomas







PHP Programmer - interactivetools.com
Attachments:

CMS Builder.png 122K

By pault - August 20, 2016

Thanks Greg, I can see that this works but does give the user the ability to overwrite the default value.

Is there a way to have it so that it can't be overwritten?

Regards, Paul.

By gregThomas - August 23, 2016

Hi Paul, 

There isn't a way to make it so that the user can't edit the permalink by default. We could customize the plugin for you so that this happens. If you send an email to consulting@interactivetools.com we can give you estimate for implementing this feature. 

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By In-House-Logic - August 24, 2016

Just a thought: would making that field a system-field with a default value address this?

J.

By Damon - August 24, 2016

Hi,

Just a thought: would making that field a system-field with a default value address this?

Making the field a system field or admin only would save the default value but not the custom added permalink. A plugin could be created to save the custom permalink on post save.

As an alternate and depending on work flow for adding content, one could have an admin only field with a default hidden checkbox checked, then users could add content and then an admin could uncheck hidden to make the record live and create the permalink at the same time.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/