i have a set up where i have nodetype 'c' that references nodetype 'b', which references nodetype 'a' linked by cck node reference fields.

i would like a path of a-title/b-title/c-title for content type c, where b-title is the title of the node referenced by c, and a-title is the title of the node referenced by b. however, pathauto only allows for one level of dereferencing on fields. so, i'd like to request some way of allowing multiple levels of dereferencing to allow multiple layers.

ie.
shop-name/exclusive-shop-product-name/picture1
shop-name/exclusive-shop-product-name/picture2
etc.

thanks

Comments

greggles’s picture

Title: multiple levels of dereferencing » multiple levels of node-referencing
Project: Pathauto » Token
Version: 6.x-1.1 » 6.x-1.x-dev
Category: feature » support
Status: Active » Postponed (maintainer needs more info)

This is really a token issue. However, for performance reasons it doesn't make sense to provide this "out of the box" in token.

Instead, you should write your own hook_token_list and hook_token_values (see the token API.txt file)

I'm changing this to a support request to help with any questions you might have about writing those hooks.

George2’s picture

Category: feature » support
Status: Postponed » Postponed (maintainer needs more info)

thanks for the quick response.

do you think a token like:

[field_foo_bar:field_some_name-title]

where the path of dereferences is specified would make sense? here the content type has a node reference field_foo_bar, which points to a nodetype that has a node reference field of field_some_name, and i want the title of it. this could then have a path of dereferences longer than two, and maybe if a multiple choice node reference field was chosen, rather than hardcoding to the first option, maybe allow keys?

thanks

EDIT: nope, tokens can't be dynamic, so maybe just provide a statically generated list of possible dereference paths?

greggles’s picture

Category: support » feature
Status: Postponed (maintainer needs more info) » Postponed

That does make sense, and would be a great feature provide, but not until token 2.x (which could do that while not killing the server).

Dave Reid’s picture

Category: support » feature
Status: Postponed (maintainer needs more info) » Closed (won't fix)

As Token in D6 has been stable for quite a while, and it doesn't really make sense to start on a Token 2.0 when we have tokens in D7 core, I'm going to mark this as won't fix.