Experimenting with Drupal 6.x with views 6.x-2.x module... I could use your help with implementation:
I need a hierarchical sidebar menu for lots of content, so I'm using Book Page as my main content type, rather than Page, and I utilize the Book Navigation block to get the content menu. Now I've run into a conundrum:
One of my books is an About Us book, with multiple book pages. I also have a view set up that returns a grid with user/member information by role (for departments) from profile fields. So far so good, but I can't seem to locate a way to display the views page results as a book page, so it can show up under the Book Navigation menu hierarchy. Any ideas?
Is there a clean way to include a view in a book page in Drupal 6.x, or is there a better way of doing hierarchical menus than using book pages/book navigation? The site users will be adding additional pages, so the Book concept seems like the right approach, as the navigation is already built-in.
Thanks in advance for your help...
Comments
Inserting Views via PHP
Found a section on Inserting Views for Drupal 5.x, but nothing so far on 6.x... The Views 2.x API seems to have changed.
[edit]
OK, for anyone interested (while the Views 2.x documentation is still under development) the following PHP code snippet should embed a view into any node body text via the PHP filter:
You can also test out the
You can also test out the Insert View module. I've tried it on a D6.3 install, seems to work fine.
Thanks!
I'll give it a look-see... The Insert View module wasn't available for D6.x at the time I was looking to embed Views 2.x.
I'm getting the following warning when I attempt this...
I'm trying to dump a view of a list of holidays in a book page, it does display, but also comes with the following warning on the top of the page:
Any idea what may be the cause?
Its a view created from an event content type I created.
Thanks!
Another option (for Views 2 in Drupal 6.x) is to use:
Another option (for Views 2 in Drupal 6.x) is to use:
function views_embed_view($name, $display_id = 'default')
$name = name of the view (machine name with no spaces)
$display_id = (see below)
To figure out the id of a display, hover your mouse over the tab to select that display. Everything after the '#views-tab-' is the id of that display. This ID is guaranteed never to change unless you delete the display and create a new one.
From: http://views-help.doc.logrus.com/help/views/embed
I get a parse error when I attempt this...
I've attempted this with an event view from an event content type I created...
I added the following to a book page using the php filter:
Same thing happens with
Any ideas what it is I'm missing?
Thanks!