Forums / Cotonti / Support / Handy URLs and URL links.

Questions...

Trustmaster
#34148 2012-05-01 19:58

I'm sorry that this is undocumented, but out of the box with Handy preset, URLeditor understands 3 types of magic parameters, inherited from 'page' module:

  • c=* is understood as structure category code, and so cot_url('foo', 'c=bar') is transformed into /foo/bar or /foo/path/to/bar (depending on $structure['foo']['bar'] contents).
  • al=* is understood as alias, so cot_url('foo', 'al=baz') is transformed into /foo/baz, but cot_url('foo', 'c=bar&al=baz') will become /foo/bar/baz.
  • id=* is understood as numeric identifier, so cot_url('foo', 'id=123') is transformed into /foo/123.

You don't even need to hook into urleditor to use them.

May the Source be with you!