[development] Re: [infrastructure] Drupal.org should have better
URL aliases
Bèr Kessels
ber at webschuur.com
Tue Dec 27 19:51:34 UTC 2005
Op dinsdag 27 december 2005 17:21, schreef Dries Buytaert:
> How does the system knows that 'project/foo' is node 42 of type
> project, that 'blog/2005/12/27/hello_world' is node 69 of type blog,
> or that 'about' is node 1 of type page? And vice versa, that node 42
> is 'project/foo', that node 69 is 'blog/2005/12/27/hello_world' or
> that node 1 is 'about'?
okay, before anyone is about to aks his: 'how about user defined mappings'.
sure: the example:
user_path_mapping.module
save strings from an interface -> variable_set('my_map_1', $post['map1']);
in the menu
function user_path_mapping_menu() {
$items[] = array('title' => 'cool thing',
'original_path' => ariable_get('my_map_1', $post['map1']),
'original_replace' => array('%year' =>'$obj->year', ..., '%title' =>
'$obj->title'), // somehow get this from a ui too
'callback' => 'user_path_mapping_show',
...
}
Bèr
--
PGP ber at webschuur.com
http://www.webschuur.com/sites/webschuur.com/files/ber_webschuur.asc
PGP berkessels at gmx.net
http://www.webschuur.com/sites/webschuur.com/files/ber_gmx.asc
More information about the development
mailing list