Hi again,

My input hierarchy goes like: Make, model, style. But on display they are listed style, model, make.

If you look here at vid 51, you can see that the lowest delta is assigned to the most recently created node. In this case I created new nodes for each level.

Thanks again.

Comments

awolfey’s picture

jrao’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry, could you provide more information, maybe screenshots of the field configuration and display?

awolfey’s picture

Sorry for the delay.

Here is the node/edit for the field. from left to right we have make, model, style.

http://gyazo.com/9bab1ffb3518cf222d694f3a3da6ceb5.png

Here is the config for the field. THe content type is "vehicle" referencing make, model and style types.

http://gyazo.com/ec661f05605cfd6abc0973d822d66a30.png

Here is the HS config:
http://gyazo.com/274f37ead66643541d4be115fe9be825.png
http://gyazo.com/22de9ab6a5b9c0e1200443507853cf80.png

And here is the display view:

http://gyazo.com/eb769ccbfeb6b8ec8e7c1a2c1fcc00a5.png

I have a node ref field in 'style' referencing models, and a field in 'model' referencing makes.
I tried reversing those references (make refs model, model refs make) but then in input form was backwards.

Thanks for looking at this.

jrao’s picture

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

Ok, I added 3 theme functions to help display the value(s) for node reference field using this module as input, README.txt is updated, you can use print theme('hs_nodereference_selection_as_lineages', $node, $field_name); to display the field value in lineage form, and override theme_hs_nodereference_lineages and theme_hs_nodereference_lineage to get desired look and feel.

awolfey’s picture

jrao, I only tested theme('hs_nodereference_selection_as_lineages', $node, $field_name) and it works great.

Thanks!

jrao’s picture

Status: Needs review » Fixed

No problem

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

awolfey’s picture

Status: Closed (fixed) » Active

I'm working on this again and having trouble seeing how to implement this in the views output of the field. The views output is still displaying the selections in the reverse order as style, model, make instead of make, model style.

Thanks

jrao’s picture

Status: Active » Needs review

Ok, I added a CCK formatter called "Hierarchical Select lineages" which can be used in CCK and views, use this formatter in views and it will render the node reference field using theme_hs_nodereference_selection_as_lineages

awolfey’s picture

This looks good. I'll be playing with it over the next week and will report back.

One thing I see right away in views is that for my case sometimes I want the output to link back to the referencing node. I have the Link this field to its node checked, but the new formatter is overriding that. But sometimes I will want the field to link back to each referenced node, which seems to be the default behavior. I can override the theme functions to do what I need, but maybe you would consider creating a configurable option.

Thanks again. It's a big help.

jrao’s picture

Good suggestion, I added render_link argument to theme functions and split the formatter into two, a link version and no link version, this should solve your problem.

awolfey’s picture

Status: Needs review » Fixed

Perfect. Thanks again.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.