Drupal 视图模板
我有一个使用 Drupal 6 的 CMS 系统,其中有一个 Template.tpl
文件,该文件将每个节点重定向到自定义模板页面。例如,“关于我们”页面节点定向到 aboutus.tpl.php
页面:
if(arg(0) == 'node' && arg(1) == '1' && arg(2) == '')
{
$vars['template_file'] = 'about';
}
现在,如果我在后端创建一个视图,我会尝试制作一个自定义页面。因为视图不是单个节点;我应该写什么来显示我的定制设计的视图值?目前它仅显示在 CMS 后端设计上。
谢谢!
I have a CMS system using Drupal 6 with a Template.tpl
file which redirects each node to a customized template page. For example, the "about us" page node is directed to aboutus.tpl.php
page:
if(arg(0) == 'node' && arg(1) == '1' && arg(2) == '')
{
$vars['template_file'] = 'about';
}
Now, if I create a view on the back end, I try to make a customized page. Because the view is not a single node; what should I write that will display the view value on my customized design? Right now it is displaying on the CMS back end design only.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有很多网站可以帮助您覆盖视图模板文件。以下是一些可以帮助您入门的内容:
http://drupal.org/node/394994 <- - 另请参阅本页底部列出的资源
http://www.group42.ca/theming_views_2_the_basics
There are lots of websites which will help you override a Views template file. Here are a few to get you started:
http://drupal.org/node/394994 <-- see also resources listed at the bottom of this page
http://www.group42.ca/theming_views_2_the_basics