Hello,
First, I wanted to say that I really like this module a whole lot. It makes building a complex page layout a whole lot simpler. I've run into a problem though. I'm wanting to embed a related view into a node using Composite Layout. I realized that I couldn't add the view in its default state, or as a page, so I created a block for the view and then added that. This is good, except that I don't have a way to send a argument to the view to filter its display. Would it be possible to add the ability to pass view arguments to Views blocks? The only other option is for me to make a different block manually for each possible input, which seems to defeat the purpose of having a simple view to begin with.
Better yet, would it be possible to extend this module so that a view can be directly selected? It's unlikely any of the blocks I am creating will be used for any purpose other than Composite Layouts, so it would make more sense to not have them at all, and just add the view itself.
To summarize my requests:
If possible, please implement more robust Views support. I'd love to be able to embed a view without creating a block-view first.
Allow views, in block form or otherwise, to accept an argument (either hard coded and specific to the node that is serving as the composite layout, or retrieved from a selectable field in the composite layout node).
Comments
Comment #1
bengtan commentedIf you really need a workaround quickly, I believe Views allows you to use PHP code to manipulate the view arguments. You can then directly interrogate some Drupal global variables to compute the desired arguments yourself.
From memory, I last used this trick in Views 5.x-1.x for a site completely unrelated to Composite Layout. My guess is this feature has been carried over into Views 6.x-2.x.
It's possible, but please don't count on that happening anytime soon. I don't have a need for such a feature, so I can't quite justify spending the time on it.
Comment #2
mojzis commentedsubscribe for the arguments, I think it'd be great to be able to work with tem ...
Comment #3
josi123 commentedI use View Reference CCK field type to do what you describe. I pass the %nid argument to the view. Then add that CCK to Composite Layout for the node.
Comment #4
afterdark commentedI did what josi123 described, and it worked for me.
I'd like to thank bengtan & fellas for this quite simple and yet efficient module. I'm impressed, after seeing a lot of complicated modules that go round and round and doesn't solve my issues and this is (to me at least, i'm a very simple guy) pure gold, man!
Congratulations.
Comment #5
AntiNSA commentedCan you please explain to me how exactly to do this? I really need it... thanks!
Comment #6
interestingaftermath commentedsubscribe
Comment #7
interestingaftermath commentedAs an update, the Views Reference CCK field works perfectly! Thanks for the tip josi123
Comment #8
bengtan commentedExpiring this issue as it is old and uncertain whether it is still applicable.