简体   繁体   English

如何将多个视图块嵌入一个视图块并有条件地显示它们?

[英]How to embed multiple view blocks into a view block and display them conditionally?

I'm trying to embed multiple view blocks into a single view block. 我正在尝试将多个视图块嵌入到单个视图块中。 However, I want each of the other views displayed only if they meet certain conditions. 但是,我希望每个其他视图仅在满足某些条件时才显示。

What is the best way to do this? 做这个的最好方式是什么?

Im running Drupal 6 with Views 2 and CCK. 我正在使用Views 2和CCK运行Drupal 6。

我个人将使用多个块,并使用块可见性选项来决定显示什么。

Additional answer. 附加答案。

If you can't use multiple blocks and the standard block visiblility. 如果您不能使用多个块并且标准块具有可见性。 The other way you can work around this is to use hook_block in your own module to call the views when needed. 解决此问题的另一种方法是在需要时使用自己模块中的hook_block来调用视图。 either by using views_block() or calling views_embed_view() 通过使用views_block()或调用views_embed_view()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM