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:

  1. Apply patch
  2. Create view called 'submenutree' that accepts a Content:NID argument and allows for multiple terms per argument (see screenshot)
  3. Configure the view display as you wish and any CSS to compliment it
  4. Edit each node you wish to use the view and select 'View:submenutree' under 'Display submenu trees as'
  5. Enjoy!

Here is a screenshot of the view in action.

Thanks!

CommentFileSizeAuthor
submenutree_views.diff1.96 KBpianomansam

Comments

brenes’s picture

Hello, 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?

kasiawaka’s picture

Version: 6.x-1.4 » 6.x-1.5
Status: Needs review » Reviewed & tested by the community

Hello,
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

bengtan’s picture

Status: Reviewed & tested by the community » Needs work

Hi,

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.

technikh’s picture

+1 subscribing..

pianomansam’s picture

@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.

devin carlson’s picture

Version: 6.x-1.5 » 7.x-2.x-dev

I 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.

colinafoley’s picture

I've started working on a patch for this.

ivnish’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)