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

bengtan’s picture

Status: Active » Postponed

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

Better yet, would it be possible to extend this module so that a view can be directly selected?

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.

mojzis’s picture

subscribe for the arguments, I think it'd be great to be able to work with tem ...

josi123’s picture

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

afterdark’s picture

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

AntiNSA’s picture

Can you please explain to me how exactly to do this? I really need it... thanks!

interestingaftermath’s picture

subscribe

interestingaftermath’s picture

As an update, the Views Reference CCK field works perfectly! Thanks for the tip josi123

bengtan’s picture

Status: Postponed » Closed (won't fix)

Expiring this issue as it is old and uncertain whether it is still applicable.