By nrixham on
Hi All,
This one seems like it should be simple, but then I'm new to drupal and nothing seems to be simple at the moment :)
I have the following set-up:
Services [Page]
Child Page 1 [parent item Services]
Child Page 2 [parent item Services]
Child Page 3 [parent item Services]
Child Page 4 [parent item Services]
Now on the services page I'd like to display a list of the "child" pages..
so i create a block view, add in the proper display settings and set view to nodetype="page".. and now i need to filter it to include all these childpages only.. not the nodeid's "pages where parent item = services page" basically
any help? perhaps I can't see the wood for the trees on this one.
Regards,
Nathan
Comments
somebody tell me this is
somebody tell me this is simple and I'm just missing a button somewhere..
Not as easy
As far as I'm aware there is no such filter available in Views. There probably should be, though. :-) Sounds like a good patch to Views (or an add-on module). The way you'd want to do it, I think, is to add a filter to nodes that filters on menu parent. Then create a block view that takes one argument, which defaults to the nid of the current page. (You can do that in Views 2.) Block views don't normally take arguments so the default will always be used, and voila.
That "add menu integration" part is the sticking point, though.
--
Larry Garfield
http://www.garfieldtech.com/blog
http://www.palantir.net
--
Larry Garfield
http://www.garfieldtech.com/
Thinking Functionally in PHP: https://leanpub.com/thinking-functionally-in-php
Perhaps I should have mentioned..
I'm on views 2 - thanks for the response Larry; I'd thought I was missing something obvious - could be my first contribution seeing as one needs the functionality!
Regards,
Nathan
If I understand correctly what you're trying to do...
Views will not be the easiest way to do it. The easy way would be to create these pages as book pages. Then you get the list of child pages at the bottom of the parent page for free.
I'll give that a try..
sounds like it may work - I'd prefer to keep pages as pages and not book pages (probably as I'm a bit retentive that way) but if it works...!
thanks
Now on the services page
It all depends on how you've defined the children-- are you using a module or nodreference field of some sort?
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz