I was trying to use part of an address as a token for Pathauto replacement -- specifically the administrative area (state in the U.S.). I'm guessing using address tokens for this and for Automatic Entity Label is probably pretty common.

But drilling down into the available tokens, the only one listed was the token for the overall field, which concatenates all of the address information together.

I'm not sure if listing the tokens for the individual fields is possible there (that may be in Token module's domain) but it would be nice to at least have them documented. I wasn't sure they even worked, but when I tried adding ":administrative_area" to the end of of the address field's token, lo and behold there it was. Given that they do exist, could they be listed out somewhere in the readme or online docs?

Comments

rootwork created an issue. See original summary.

bojanz’s picture

We don't provide any tokens, that's all the Token module.
So if there are subtokens but they're not listed in the token browser, that might be a Token bug.

bradjones1’s picture

Status: Active » Closed (won't fix)

These properties are exposed by default in the Token browser since mid-2016. I have noticed some strange behaviour when trying to access these properties via an entity reference, however that's a bit of a separate issue and in token module, regardless.

rootwork’s picture

Title: Document using tokens for address parts » Document using tokens for address parts in an entity reference
Project: Address » Token
Status: Closed (won't fix) » Active

Fair enough; let's move it then.