Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Drupal 中创建了一个新主题。我需要在自定义页面中显示一个视图,但我不想使用该区域。我需要我们将它添加到 tpl 页面的 php 代码
您可以views_embed_view在模板中使用。第一个参数是视图的集合名称,第二个参数是显示名称。
views_embed_view
<?php echo views_embed_view('myview', 'block'); ?>