块覆盖
我有一个页脚块,看起来像
<div class="art-Footer">
<div class="art-Footer-background">
<div class="region region-copyright">
<div id="block-menu-menu-footer-menu" class="block block-menu contextual-links-region">
<div class="contextual-links-wrapper">
<ul class="contextual-links">
<li class="menu-list first"><a href="/drupal7/?q=admin/structure/menu/manage/menu-footer-menu/list&destination=node">List links</a></li>
<li class="menu-edit"><a href="/drupal7/?q=admin/structure/menu/manage/menu-footer-menu/edit&destination=node">Edit menu</a></li>
<li class="block-configure last"><a href="/drupal7/?q=admin/structure/block/manage/menu/menu-footer-menu/configure&destination=node">Configure block</a></li>
</ul>
</div>
<div class="content">
<ul class="menu">
<li class="first leaf"><a href="http://drupal.org" title="">About</a></li>
<li class="leaf"><a href="/drupal7/" title="" class="active">Accessibility</a></li>
<li class="leaf"><a href="/drupal7/" title="" class="active">Contact us</a></li>
<li class="leaf"><a href="/drupal7/" title="" class="active">Feeds</a></li>
<li class="leaf"><a href="/drupal7/" title="" class="active">Privacy Policy</a></li>
<li class="last leaf"><a href="/drupal7/" title="" class="active">Terms of use</a></li>
</ul>
</div>
</div> <!-- /block -->
<div id="block-block-2" class="block block-block contextual-links-region">
<div class="contextual-links-wrapper">
<ul class="contextual-links">
<li class="block-configure first last"><a href="/drupal7/?q=admin/structure/block/manage/block/2/configure&destination=node">Configure block</a></li>
</ul>
</div>
</div>
</div>
</div>
我试图为其制作一个特殊的模板文件,并将其命名为 block-menu-menu-footer-menu.tpl.php,因为我曾经在 drupal 6 中命名该文件,但它没有加载文件。 我尝试了一切,正如他们在 Drupal 7 中所说的那样。
你有什么建议吗?
i have a footer block which look like that
<div class="art-Footer">
<div class="art-Footer-background">
<div class="region region-copyright">
<div id="block-menu-menu-footer-menu" class="block block-menu contextual-links-region">
<div class="contextual-links-wrapper">
<ul class="contextual-links">
<li class="menu-list first"><a href="/drupal7/?q=admin/structure/menu/manage/menu-footer-menu/list&destination=node">List links</a></li>
<li class="menu-edit"><a href="/drupal7/?q=admin/structure/menu/manage/menu-footer-menu/edit&destination=node">Edit menu</a></li>
<li class="block-configure last"><a href="/drupal7/?q=admin/structure/block/manage/menu/menu-footer-menu/configure&destination=node">Configure block</a></li>
</ul>
</div>
<div class="content">
<ul class="menu">
<li class="first leaf"><a href="http://drupal.org" title="">About</a></li>
<li class="leaf"><a href="/drupal7/" title="" class="active">Accessibility</a></li>
<li class="leaf"><a href="/drupal7/" title="" class="active">Contact us</a></li>
<li class="leaf"><a href="/drupal7/" title="" class="active">Feeds</a></li>
<li class="leaf"><a href="/drupal7/" title="" class="active">Privacy Policy</a></li>
<li class="last leaf"><a href="/drupal7/" title="" class="active">Terms of use</a></li>
</ul>
</div>
</div> <!-- /block -->
<div id="block-block-2" class="block block-block contextual-links-region">
<div class="contextual-links-wrapper">
<ul class="contextual-links">
<li class="block-configure first last"><a href="/drupal7/?q=admin/structure/block/manage/block/2/configure&destination=node">Configure block</a></li>
</ul>
</div>
</div>
</div>
</div>
I tried to make a special template file for it and called it block-menu-menu-footer-menu.tpl.php as I used to name the file in drupal 6 but it's not loading the file.
I tried everything, as they said in Drupal 7.
Do you have any suggestion?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有一个类似的模板,我使用的文件名是 block--menu--menu-footer-menu.tpl.php
只需仔细检查,您是否将菜单添加到管理控件中的页脚块(/admin/struction/block)?
I have a similar template, and the filename I'm using is block--menu--menu-footer-menu.tpl.php
Just double checking, did you add the menu to the footer block in the admin controls (/admin/structure/block)?
查看有关在 Drupal 中覆盖块模板的提示。它是为 Drupal 6 编写的,但其中一些一般概念仍然可以在 7 中对您有所帮助(例如如何使用 devel_themer)。
更新:
这是它仍在工作时的帖子:
http ://web.archive.org/web/20110214075625/http://coldfrontlabs.ca/news/drupal-quick-tip-12-overriding-block-templates
Check out this tip on overriding block templates in Drupal. It was written for Drupal 6 but there are general concepts that should still help you in 7 (like how to use devel_themer).
Update:
Here's the post when it was still working:
http://web.archive.org/web/20110214075625/http://coldfrontlabs.ca/news/drupal-quick-tip-12-overriding-block-templates