[development] Pathauto scaleability - path column in node / user table

Jeremy Epstein jazepstein at gmail.com
Tue May 9 05:32:12 UTC 2006


On 5/9/06, Earl Miles <merlin at logrus.com> wrote:
> But this also leaves out 'user' and any other non-node object that may
> want URLs of this nature.

In order for (potentially) any object to manage its own primary
aliases, I think we need a hook_path(). I really do. Modules would
simply implement this hook by returning, say, the table and the field
where the path is stored. I guess they'd also return the URL fragment
that is their 'realm' - for node, this would be 'node' (since all node
paths are in the form 'node/x'). E.g.:

function node_path() {
  return array('table' => 'node', 'field' => 'path', 'path' => 'node');
}

Or perhaps we could even accomplish this without a _path() hook, by
using hook_db_rewrite_sql()? It's about time that we added path
support to this hook anyway. Particularly if we modified this hook to
support SELECT and other clauses (see <http://drupal.org/node/60853>),
it could work.

I love the idea - allowing modules to manage their own paths. But it
has to be implemented so that any module can manage its own paths, not
just node module.

Cheers,
Jaza.


More information about the development mailing list