don't prefix path

moshe weitzman - January 7, 2007 - 06:00
Project:Site tours with Amberjack
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:minor
Assigned:Unassigned
Status:active
Description

like Views, just setup a dynamic path with whatever path was specified by the user. don't prefix it with site_tour. users will have to be non stupid about picking paths. i think we can trust them ... nice module!

#1

stefano73 - January 7, 2007 - 18:33

Hello Moshe, thanks for your comments on this module. I think that every Drupal module should handle a specific path prefix (usually arg(0)), to avoid conflicts with other modules. Just like user.module has user/*, node.module has node/*, etc... An url like www.example.com/site_tour/introtour makes it easier to guess that site_tour.module owns that path, and in case of problems (for example if the redirect to the first tour page doesn't work) it's easier to focus on the site_tour.module for debug.
Anyway, I'm going to add a #field_prefix to the URL ID textfield, to show the user what will be the full path for the tour. I'll post a patch for this tomorrow.

#2

moshe weitzman - January 7, 2007 - 23:00

well, this topic is mostly a matter of taste.l but i think that this practice is a bit old. we should make the admin happy and give him exactly the URL he wants. URLs are basically marketing decisions. You might argue then that the admin should alias this path and thats a good solution too. if you really want to stick with aq prefix, you might consider implementing pathauto hook so that drupal can automatically alias these urls.

as noted, this is all minor stuff but i thought i would mention it.

#3

Tobias Maier - February 5, 2007 - 20:20

+1 for moshes suggestion
it is really better to be able to specify the path directly the way I want.

 
 

Drupal is a registered trademark of Dries Buytaert.