Hi Wim,

Thanks to your post here: http://drupal.org/node/426770 I have been able to get [save-lineage-termpath] working with '/' in PathAuto instead of the seperator '-'. URL's are displaying correctly so thats great, thank you!

I am trying to have the terms seperated by '/' in the URL BUT the terms seperated by ' ' (a space) in the Title of the page using 'Automatic Nodetitle' module.

What I have:
URL: ../vehicle/toyota/corolla/E140 ('/' used by PathAuto module (thanks to your hack))
Title: Toyota-Corolla-E140 ('-' is currently used by Automatic Nodetitles module)

What I want:
URL: ../vehicle/toyota/corolla/E140
Title: Toyota Corolla E140 (' ' used by Automatic Nodetitles module only)

I could change the seperator in PathAuto > General settings from '-' to ' ' but "Using a space or + character can cause unexpected results" ... and it does. It overrides the PathAuto hack AND its a site wide change which I don't want.

Would you have up your sleeve a simple hack for the 'Automatic Nodetitles' module as their was for the PathAuto module?

I don't know PHP very well and I hope I'm on understanding the workings of this correctly. It such a great module! Any help or hints would be much appreciated.

CommentFileSizeAuthor
#4 hs_table_1.gif2.62 KBtribe_of_dan
#4 hs_table_2.gif2.86 KBtribe_of_dan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Status: Active » Postponed (maintainer needs more info)

Maybe I can add a [save-lineage-termpath-slashes] and [save-lineage-termpath-spaces]. It's not The Right Way, but it'd simplify things a lot I think. Then the "hack" (it's not really a hack but I understand that it can be perceived as one). What do you think?

tribe_of_dan’s picture

Thanks for your quick response! Yes I think that would be a good solution to me. :)

If you could add those tokens it would be much appreciated.

Wim Leers’s picture

Title: A separator hack for Automatic Nodetitles? » [save-lineage-termpath-*] tokens, with * slash/backslash/dash/underscore/space, to simplify token usage
tribe_of_dan’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
2.86 KB
2.62 KB

Just another thought on this. [save-lineage-termpath] is very convenient to create quick URLs/Titles and the obvious benefit is that it shows all the levels that exist in the hierachy (no matter how many levels) which is great.

Would it be worth creating a token that you could define levels for? ...something like: [hs_term_delta:#] where # is the number of the level. eg. 0 for root etc. Perhaps it would allow for more flexibility?

For instance, the seperators wouldn't be an issue eg. [hs_term_delta:0]/[hs_term_delta:1]/[hs_term_delta:2]

I guess its limitation is that if there is no information in a level e.g. (Delta:2) there would be some funky token language in the URL title (PathAuto) or Page Title (Automatic Nodetitles) unless you could force it to display nothing if the level doesn't exist in that hierarchy.

The idea for this came out of this problem I was having:
- In Views I can only seem to create tables where all the hierachy is in one cell (see attachment 1).
- But what if I wanted it to display like in (Table 2)? i.e. a column for each level in the hierachy (that I could make sortable).

Would this be an appropriate solution to this problem? What do you think?

Wim Leers’s picture

Status: Needs review » Postponed (maintainer needs more info)

Interesting idea! However, it indeed will give funky results when nothing exists at a certain level …

Your goal, separate columns for terms at each level, is achievable, but it's impossible to make it sortable. Well, it's not impossible, but it'd be extremely inefficient: *all* terms for that column would have to be loaded into memory and *then* be sorted.
In your case, you'll need to use something like Materialized Views to get good performance if you want sorting on those columns.

tribe_of_dan’s picture

Yes I see. Well if you could create a [save-lineage-termpath-*], that would be great!

Thanks!

tribe_of_dan’s picture

Status: Postponed (maintainer needs more info) » Needs work
Wim Leers’s picture

Version: 6.x-3.0 » 6.x-3.x-dev
Assigned: Wim Leers » Unassigned
Category: support » feature
Status: Needs work » Active

Somebody who wants to roll this patch?

Wim Leers’s picture

Status: Active » Closed (works as designed)

Closing due to lack of response.

tribe_of_dan’s picture

Status: Closed (works as designed) » Active

Doh! I still need this functionality... am I really the only one?

I would patch if I had the know-how.

Can anyone help? Even is it was a quick and dirty hack to get me out of trouble. Clues?

Wim Leers’s picture

Status: Active » Closed (works as designed)

You've been waiting for this for almost a year. You'd think you'd have moved on by now :P :)

I'm afraid you're alone in this. I'm sure you understand it doesn't make sense to put a significant amount of my time in a feature that virtually nobody would use. So I'm afraid I"m going to have to close this again. Sorry!