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
Comment #1
awolfey commentedSorry, here's the image.
http://gyazo.com/dcdf1a4904eafba87b30f101fb2e4367.png
Comment #2
jrao commentedSorry, could you provide more information, maybe screenshots of the field configuration and display?
Comment #3
awolfey commentedSorry 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.
Comment #4
jrao commentedOk, 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.
Comment #5
awolfey commentedjrao, I only tested theme('hs_nodereference_selection_as_lineages', $node, $field_name) and it works great.
Thanks!
Comment #6
jrao commentedNo problem
Comment #8
awolfey commentedI'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
Comment #9
jrao commentedOk, 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
Comment #10
awolfey commentedThis 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.
Comment #11
jrao commentedGood 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.
Comment #12
awolfey commentedPerfect. Thanks again.