开发者

Views Attach-Node Content alternate block region output

开发者 https://www.devze.com 2023-03-08 08:12 出处:网络
I am using the \'Node Content\' output format from the Views Attach module to display nodes referenced to a parent node.

I am using the 'Node Content' output format from the Views Attach module to display nodes referenced to a parent node.

The referenced nodes output as part of the $content va开发者_如何转开发riable but I really need it to output in a block separate from the content.


Regular views blocks can't access agruments, but I guess you might try a panels module and a content pane view display. This way you would get some freedom of arranging the results.


Thanks Dmitry Vyal, I have never used the Panels module and when I tried your suggestion I had problems with Views Panel which made your suggestion unworkable.

However, what I ended up doing was calling my view programatically from page.tpl.php.

Basically, I created the view as a regular block with arguments. We know blocks do not work with arguments but that's if you output it in a region as you would normally do. My views generated block is only output by printing it from php which is where I also dynamically provide it with arguments.

It works.

0

精彩评论

暂无评论...
验证码 换一张
取 消