Drupal 面板、“编辑面板”;标签缺失
当我切换主题时,我注意到一些奇怪的事情。在花环中,我可以看到风景& “编辑面板”选项卡按钮;但是当我切换回自定义主题时,它就消失了。
我已经有选项卡行:
<?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
但它只是没有出现。这是为什么?
以下是 page.tpl.php 的一些代码:
<div class="main-container">
<div class="mcontent">
<div id="content-header">
<?php if ($mission): print '<div id="mission">'. $mission .'</div>'; endif; ?>
<?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
<?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?>
<?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
<?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
<?php if ($show_messages && $messages): print $messages; endif; ?>
<?php print $help; ?>
</div> <!-- /#content-header -->
<?php print $content; ?>
</div>
</div>
I noticed something odd when I switch themes. In garland, I can see the view & 'edit panel' tab buttons; but when I switch back to my custom theme, it disappears.
I already have the tabs line:
<?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
But it's just not appearing. Why is that?
Here is some of the code for page.tpl.php:
<div class="main-container">
<div class="mcontent">
<div id="content-header">
<?php if ($mission): print '<div id="mission">'. $mission .'</div>'; endif; ?>
<?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
<?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?>
<?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
<?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
<?php if ($show_messages && $messages): print $messages; endif; ?>
<?php print $help; ?>
</div> <!-- /#content-header -->
<?php print $content; ?>
</div>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
到目前为止,我已经在很多自定义主题中使用了该代码,没有任何问题。
如果不查看站点/您的代码,很难知道,但有几种可能性:
node.tpl.php
等。它可能是其他东西(但如果其他主题正常工作则可能不是):
通常,代码位于错误的地方,它被隐藏/模糊(通过 CSS/页面格式),或者该人没有查看它的权限。
如果上述方法都不起作用,您可能需要重建权限(在 Drupal 6 中,内容管理 > 帖子设置 > 重建权限),或者尝试启用现有权限,看看这是否是罪魁祸首。
I've used that code in quite a few custom themes without any issues so far.
It's hard to know without seeing the site/your code, but a couple of possibilities:
page.tpl.php
, notnode.tpl.php
etc.Other things it could be (but maybe not if other themes are working):
Usually, either the code is in the wrong place, it's being hidden/obscured (by CSS/page formatting), or the person doesn't have the permissions to view it.
If none of the above work, you may want to rebuild permissions (in Drupal 6, Content Management > Post Settings > Rebuild Permissions), or play with enabling existing permissions to see if that's the culprit.
我雇了人来解决这个问题,这是所做的事情:
I hired someone to fix the issue, here is what is done: