块覆盖

发布于 2024-10-24 01:35:51 字数 2399 浏览 8 评论 0原文

我有一个页脚块,看起来像

<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&amp;destination=node">List links</a></li>
          <li class="menu-edit"><a href="/drupal7/?q=admin/structure/menu/manage/menu-footer-menu/edit&amp;destination=node">Edit menu</a></li>
          <li class="block-configure last"><a href="/drupal7/?q=admin/structure/block/manage/menu/menu-footer-menu/configure&amp;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&amp;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 技术交流群。

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

发布评论

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

评论(2

别闹i 2024-10-31 01:35:51

我有一个类似的模板,我使用的文件名是 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)?

苍风燃霜 2024-10-31 01:35:51

查看有关在 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

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