Can the functionality of Embed Children View be modified to allow the argument settings for the view to include either "Parent Node ID" or "Descendant of"? I'd like to list all the nodes of a certain type that are descendants of the node being viewed. My view works great as a block (using the argument handling code to tell the block where it is) or if i embed it directly in my page.tpl.php, but I'd like to be able to use it using the "embed child view" functionality (to only put it on certain, arbitrary nodes.)

On a side note, it would be helpful, in either case, to do one of two things:
a) document that only views using "node hierarchy: parent node id" as an argument can be used as an embedded children view
b) (and even better) only list views that meet the above criteria in the dropdown

Thanks again for the great module. If there's anything I can do to help get this done, let me know.

Isaac

CommentFileSizeAuthor
#2 embed_child_view.patch672 bytesisaac.niebeling

Comments

ronan’s picture

To your side notes: The module will attempt to modify existing views by adding the 'parent node' argument, so theoretically any view should work just fine in this context. That's why I'm not limiting it. If you're finding that views without that argument are not in fact working, let me know (I never actually use this functionality so it may be a little under-tested).

To that end, I'm checking if the 'parent node' argument exists in a view before adding it, so I guess in theory I could check if the 'decedent of' argument is there too and don't add any arguments if it is. That would probably have the effect you're looking for.

Shouldn't be too big a change, I'll try and sneak it in there next time I get a chance to work on the module

Thanks
Ronan

isaac.niebeling’s picture

StatusFileSize
new672 bytes

I've attached a patch to allow the "Descendant of" argument. At this point, that's the only change; it might be good to have a checkbox on the embedded child view to choose between descendant and child for the argument (if there isn't one set). Just a thought.

Isaac

ronan’s picture

Cool, thanks. I may not get to this until this weekend, but I'll try and get this in there at that time.

ronan’s picture

Status: Active » Needs review
ronan’s picture

Status: Needs review » Fixed

Committed to dev. Thanks again for the patch

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.