Ok, now that I've made the 5--2 branch for the new version I want to start working on the token.module integration among other features.

I believe the only pattern that pathauto would have to handle is [catpath] (which is a pain!) but it's much fewer than we have now.

Comments

greggles’s picture

Ok - question on this.

I'm starting into the work and have started by showing (and using) _all_ of the patterns available in a context. So, for example, the following patterns are available in the context of a user:

[user]
    User's name
[uid]
    User's ID
[mail]
    User's email address
[reg-date]
    User's registration date
[reg-since]
    Days since the user registered
[log-date]
    User's last login date
[log-since]
    Days since the user's last login
[date-in-tz]
    The current date in the user's timezone
[account-url]
    The URL of the user's profile page.
[account-edit]
    The URL the user's account editing page.

So - many of these are nonsensical for a pathauto situation. Right now I am getting this by finding all tokens available for "user" and then presenting them. This has the benefit of "just working" when a user adds a new module (e.g. date, even, i18n) that exposes tokens. But it has the drawback of presenting nonsense to the user (why would I want to create a pattern that contains the [account-edit]????)

Thoughts?

wim leers’s picture

I agree that tokens that are dependent on the current user (i.e. dates) and completely irrelevant things (i.e. complete URL's) are completely useless for pathauto. IMO pathauto should filter them out.

greggles’s picture

yes, as I think about this more it makes more and more sense. eaton and I just discussed it and will add this prior to a pathauto-5.x-2 full implementation...

http://drupal.org/node/135444

greggles’s picture

Status: Active » Needs review

So, this "needs work" because it needs love for the contrib incs that live in pathauto, and evangelizing to other contrib maintainers, and, etc....

But here it is. Please test.

In my humble opionon this is avesome.

You'll need token.module and a few patches to token.module:
http://drupal.org/node/136219
http://drupal.org/node/136220
http://drupal.org/node/136216
http://drupal.org/node/136218

If eaton commits them (or versions of them) then you won't need them all, but that could be a little while.

/me dances a little happy dance

greggles’s picture

All of the token issues I linked to have been committed, so this is now quite a bit easier to test.

Yay!

greggles’s picture

Status: Needs review » Fixed

I'm sure I introduced some issues, but this was basically working in my test area and nobody else seemed to be testing it so now it's in pathauto 5.x-2. Yay!

killes@www.drop.org’s picture

Status: Fixed » Closed (fixed)