Drupal 视图模板

发布于 2024-12-03 04:51:30 字数 375 浏览 1 评论 0原文

我有一个使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

荭秂 2024-12-10 04:51:31

有很多网站可以帮助您覆盖视图模板文件。以下是一些可以帮助您入门的内容:

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文