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
On Friday 18 May 2007 13:16, Karoly Negyesi 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 .
Thanks. I see your commits: http://drupal.org/cvs?commit=67796 http://drupal.org/cvs?commit=67795 http://cvs.drupal.org/viewcvs/drupal/contributions/docs/developer/hooks/core... Is there a delay before this appears at api.d.o? I don't see anything there: http://api.drupal.org/api/HEAD/file/developer/hooks/core.php (clicking on view source gives 404: http://api.drupal.org/api/HEAD/file/developer/hooks/core.php/source ) http://api.drupal.org/apis/HEAD/url_ I found the handbook page, though: http://drupal.org/node/23708 Blessings, Augustin. -- http://www.wechange.org/ Because we and the world need to change. http://www.reuniting.info/ Intimate Relationships, peace and harmony in the couple.
I found the handbook page, though: http://drupal.org/node/23708
I did not know about this page. As a developer I was not looking at Installation and configuration » Core modules » Path: readable URLs for menu overrides, honestly :) . I do not know how long the wait was but it's http://api.drupal.org/api/HEAD/function/custom_url_rewrite there now.
On 5/18/07, Karoly Negyesi <karoly@negyesi.net> wrote:
I do not know how long the wait was but it's
The docs are updated 2 or 4 times a day. -- Neil Drumm http://delocalizedham.com
On 5/18/07, Karoly Negyesi <karoly@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. -- Aran
participants (4)
-
Arancaytar Ilyaran -
Augustin (Beginner) -
Karoly Negyesi -
Neil Drumm