Normally I build urls with Pathauto using the location elements tokens like Country, City, State. With a new D7 site in development, I find myself with no way to do this.

I do not see an open issue in the Location module for this, and nothing specific about it here. I'd certainly be willing to try a workaround or to help facilitate or possibly sponsor this in some way.

Comments

svidot’s picture

same issue here

drupalina’s picture

Version: 7.x-1.0-beta4 » 7.x-1.0

In D6 you could have tokens for different sub-fields of the Location module: location-street, location-city, location-country etc.

But now in D7 we have only one token [node:field_NAME]

I desperately need the tokens for location 'street' and 'city' in D7 because my node titles are basically the Street address and City (e.g. "31 Liverpool Street, London") generated by AutoNodeTitle module using Tokens.

I kindly ask the module maintainers to work on this, and I can test whatever patches you provide.

Many thanks.

drupalina’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Issue tags: +D7AX, +#D7AX

Tagging this as D7AX , so as to get maintainer's attention.

dave reid’s picture

Issue tags: -D7AX, -#D7AX

This is not related to accessibility though. Please don't abuse tags.

I assume this means Location 7.x-5.x because Location 7.x-3.x doesn't use Field API.

drupalina’s picture

Hi Dave,
Sorry about the tags - didn't know that it had any extra meaning apart from alerting maintainers to new ideas, and I don't know what is meant by "accessibility" in this case.

I'm not sure about Location 7.x-5.x, it seems to be miles and miles away from a stable release. I'm just working with 7.x-3x which offers a *more-or-less* stable release. I looked at their .inc files and they do expose 'street' and 'city' and all other values just like they did in D6, so I can't see why Token can't use them. But I could be wrong.

deciphered’s picture

Status: Active » Closed (works as designed)

Looking at the code it's quite obvious that the issue isn't with Token but with the Location module: http://drupalcode.org/project/location.git/blob/refs/heads/7.x-3.x:/loca...

1. '_location' for hook instead of 'location' means that the hooks won't get called, however due to the next point I suspect this is more to disable the functionality.
2. The code looks to be a disabled, un-ported version from D6, as D7 no longer uses hook_token_list() or hook_token_values().

I sugest either moving this issue to Location or opening a new issue.

Cheers,
Deciphered.

drupalina’s picture

Project: Token » Location
Version: 7.x-1.x-dev » 7.x-3.x-dev
Status: Closed (works as designed) » Active

Thanks Deciphered,
Moving this issue to Location module.