Simplify page URLs wrt. word_separator

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Simplify page URLs wrt. word_separator

Post by cmb » Thu Jan 29, 2015 11:21 pm

Hello Community,

the URLs (actually, the query strings) of CMSimple_XH pages can contain useless occurrences of the word_separator (current default is -). Consider the page "This - That", which has the URL ?This---That. Due to respective urichar_org/new settings, this could get even messier, for instance, "Run, run, run!" might result in ?Run--run--run-. I suggest that we collapse multiple and also trim trailing and leading occurrences of the word_separator, so the URLs would be ?This-That resp. ?run-run-run. This might lead to duplicate URLs in rare cases, but these would be pointed out by CMSimple_XH anyway ("DUPLICATE HEADING").

As this would break existing bookmarks and other deep links, we should prominently announce that change in the changelog.

Of course, users could already use respective urichar_org/new settings to get around all of this issues (e.g. " - " -> "-", "? " -> "-"), but it seems to me my suggestion would make the handling a little bit simpler and cleaner.

BTW: we should revise the page headings of the default content, so that they result in cleaner URLs (?Templates-%26amp%3B-Plugins is really awkward). Maybe we also should deliver some sensible defaults for urichar_org/new wrt. punctuation and for German, umlauts).

Thoughts?
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Simplify page URLs wrt. word_separator

Post by cmb » Tue Mar 31, 2015 2:05 pm

I propose this patch. Besides trimming of superfluous word_separators, it replaces "&" with "and" in the default content, and it adds urichar_org/new settings to replace German umlauts in de.php.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: Simplify page URLs wrt. word_separator

Post by svasti » Tue Mar 31, 2015 2:28 pm

My concern is that this very nice setting won't arrive at the user's sites through our standard update files... Ok, that's another subject.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Simplify page URLs wrt. word_separator

Post by cmb » Tue Mar 31, 2015 2:33 pm

svasti wrote:My concern is that this very nice setting won't arrive at the user's sites through our standard update files...
Well, I'm pretty sure that CMSimple_XH 1.7 will require a migration (similar to 1.5 and 1.6), so this shouldn't be an issue.
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Simplify page URLs wrt. word_separator

Post by cmb » Tue Apr 21, 2015 8:42 pm

Done (r1559).
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply