I'm really happy I came across this module. I was attempting to do something like this and couldn't get it quite to work. My only issue with the module is that I only wanted to display a node title and two cck fields. I didn't want to hack apart my template to do this when viewed as a teaser, so I took it upon myself to integrate Views. My patch lays the foundation to support using a View to display the output for children menu items within the content. It can easily be expanded on to support sibling menu items as well as the block display. I didn't do this other parts because my needs were only for children within the content. Directions for using the patch as it stands are as follows:
- Apply patch
- Create view called 'submenutree' that accepts a Content:NID argument and allows for multiple terms per argument (see screenshot)
- Configure the view display as you wish and any CSS to compliment it
- Edit each node you wish to use the view and select 'View:submenutree' under 'Display submenu trees as'
- Enjoy!
Here is a screenshot of the view in action.
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| submenutree_views.diff | 1.96 KB | pianomansam |
Comments
Comment #1
brenes commentedHello, thank you for your patch. It works for one view with the name submenutree, but is there a way to add multiple views with different names?
Comment #2
kasiawaka commentedHello,
I've applied patch against version 6.x-1.5 and it works.
A note: the Submenu Tree Settings"Title" field (to be set on individual nodes) is not being displayed, neither the View title. A workaround is to use the Header field on the View and use that as a View title.
Otherwise everything works as described above.
Kasia
Comment #3
bengtan commentedHi,
Sorry, the patch is incomplete.
There shouldn't be any hardcoding in it, but the patch uses a hardcoded view name. The view display to use (ie. 'default') possibly needs to be configurable as well.
Whilst the patch does work for a narrow set of circumstances, it is not robust nor generic enough. Sorry.
Comment #4
technikh commented+1 subscribing..
Comment #5
pianomansam commented@bengtan, hence why I claimed that this laid the foundation for Views support. If you don't believe it is robust or generic enough, feel free to make it more so. That's the wonder of Open Source Software.
Comment #6
devin carlson commentedI think Views integration would be a great idea!
Unfortunately, as bengtan mentioned, this patch is a bit incomplete. I am not very familiar with integrating with Views. Is there any chance that you could provide an updated patch for the latest version of Views and Submenu Tree 7.x?
I'll definitely take a look at how to properly integrate with Views, but this may take me a while without outside support.
Also, new features should go into the 7.x branch first to prevent regressions.
Comment #7
colinafoley commentedI've started working on a patch for this.
Comment #8
ivnish