[development] documented custom_url_rewrite

Arancaytar Ilyaran arancaytar.ilyaran at gmail.com
Mon May 21 07:00:14 UTC 2007

On 5/18/07, Karoly Negyesi <karoly at negyesi.net> wrote:
> Hi,
> I just committed documentation to custom_url_rewrite , it's a not too well
> known extremely powerful function. Example usages documented: static
> aliases to dynamic paths, changing 'node' to 'article', overwriting
> already defined menu paths .
> Regards,
> NK

Thanks for that, like some others I never knew of this function before.

There's one sentence whose wording is a bit unclear: "For 'alias', an
internal Drupal path and an alias need to be returned.", which sounds
like you have two return values (as an array?). But from the code
sample, it seems that the internal Drupal path is passed *to* the
function and only the alias is returned.

So in effect, 'alias' and 'source' indicate the direction the function
works in. 'alias' indicates that the function should return the alias
of a given system path, 'source' indicates it should return the system
path of a given alias. I only actually understood this after reading
the inline comments of the function; if you explained this in the
documentation it would probably be easier to use.


More information about the development mailing list