主题中的 Drupal php 文件
在路径“\sites\all\themes\fusion\mytheme\”下,我发现一些名为“taxonomy_term_page.tpl.php”、“views-view-fields--product-brand-category--block-2”的php文件.tpl.php"...将在特定页面上生成一些特定内容,我如何将此php文件配置为特定链接/块或其他内容?
Under the path "\sites\all\themes\fusion\mytheme\", I found that some php file called "taxonomy_term_page.tpl.php", "views-view-fields--product-brand-category--block-2.tpl.php"... will generate some specific content on specific page, how can I configure this php file to specific link/block or whatever?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,解释每个文件的作用会有点长。您需要尝试一下,看看它是如何工作的。
我建议您查看:
http://drupal.org/theme-guide/6
并了解主题系统如何适用于您正在使用的 Drupal 版本。
但例如“taxonomy_term_page.tpl.php”将用于更改您创建的分类术语将访问的内容的输出。
例如。 mysite.com/taxonomy/term/ 可能是 mysite.com/cooking-books/italian-pizzas
,“views-view-fields--product-brand-category--block-2.tpl.php”将用于将输出主题化为您的视图之一,该视图配置为作为块输出...
我很高兴回答您的更多问题
Yeah it would be a bit long to explain what to do with regards to what each file does. You would need to play around a bit and see how it all works.
I would recommend that you check out:
http://drupal.org/theme-guide/6
and read up on how the theme system works for the Drupal version that you are using.
but for example the "taxonomy_term_page.tpl.php" would be used to change the output of content that you would visit for a taxonomy term that you created.
eg. mysite.com/taxonomy/term/ which might be mysite.com/cooking-books/italian-pizzas
and the "views-view-fields--product-brand-category--block-2.tpl.php" would be for theming the output to one of your views which is configured to output as a block...
I'm happy to answer any more of your questions
您将无法配置特定文件来填充特定主题的角色(这些文件是根据其目的按文件名选择的)。
您应该查看 devel 模块(特别是主题 devel 模块),它可以告诉您预期输出在特定文件中。我不确定 themer 模块是否仍在 6.x 的开发中,但如果不是,请尝试 devel_themer 模块。
You aren't going to be able to configure a specific file to fill the role for a specific theme (the files are picked by their file name for their purpose).
You should check out the devel module (specifically the theme devel module), which can tell you what parts of the output are expected in specific files. I'm not sure if the themer module is still in devel for 6.x, but if it isn't, try the devel_themer module.