The attached little patch provides token support to generate the string for the term.
This happens on node-insert and -update.

It does not (yet) generate the terms from the pattern on sync.
It still generates a single term, and not a path hierarchy.

Comments?

Comments

Zen’s picture

Status: Needs review » Needs work

At the risk of repeating myself, please provide a use case :) It looks very flexible, but what are you going to use it for?

I can't test the patch as the path is incorrect : "a/nat".

Thanks Ray.
-K

Zen’s picture

I just saw your other issue. Marking that one a dupe of this.

- have checkboxes instead of select-list to be able to activate/deactivate a custom term-generation per contenttype/vocabulary
- instead of just creating a term by title have a text field for entering a category-path interpreted by the token-module

I don't understand what you mean about checkboxes being better. How?

Category path: This sounds like a good idea. I will test this patch once you re-roll it. I'd also appreciate it if you can provide an example use case and perhaps steps to test it out.

Cheers.
-K

ray007’s picture

The checkboxes instead of select-list are necessary if we'd like to have a pattern per node-term association. But in that case the userinterface probably needs an overhaul.

What am I going to use it for: the plan is to use node_autotitle to generate the title from several fields (you could say: combination of an ID and a subtitle), and I'd like to use the id-field to generate the term-entry.

I don't yet need the category-path right now and the patch to do that would be a bit more involved, so am postponing that for now.

I've also skipped the sync operation for now since I have no idea what you do with the node_revisions there.

And for testing the patch: please use 'patch -p1 ...' ;-)

ray007’s picture

StatusFileSize
new3.9 KB

Still no path-support, but should work for sync operations now too.
New patch against current head.

Ok this way?

ray007’s picture

*Bump*

Anything wrong with the patch?

summit’s picture

Subscribing,
is this committed please?
Thanks a lot in advance for considering this!

greetings,
Martijn

anantagati’s picture

Title: token support part 1 » Token module integration
Version: master » 6.x-1.x-dev
Category: task » feature

Looks like interesting feature.

gagarine’s picture

tracking

stefan81’s picture

Hello!

Probably I am in the right thread,
If not, I'll create a new one ;)

I would like to use a Token in Pathauto respectively "Automated alias settings" for my NAT node types.
Something like [NAT-vocab-raw] and [NAT-catpath-raw]

The token should grab the [vocab-raw] and the [catpath-raw] of the taxonomy term, which NAT node is referring to.

Is that possible?