Im使用菜单块。即使ive将“块标题”设置为,块的标题仍然在页面上创建。标题似乎是菜单的路径。
如何删除标题?
谢谢
欢迎各位兄弟 发布技术文章
这里的技术是共享的
Im使用菜单块。即使ive将“块标题”设置为,块的标题仍然在页面上创建。标题似乎是菜单的路径。
如何删除标题?
谢谢
Im using Menu Blocks. Even though ive set the ‘Block Title’ to , a title of the block is still created on the page. The title seems to be the path of the menu.
How can I remove the title?
Thanks
Try putting as the title of the block. Usually that will resolve it.
Otherwise, you can always try hiding it with CSS, even though there are many reasons why you wouldn't want to do that.
My apologies!
Try putting <none> in the block title.
I'm having the same issue. I've added <none>
and it is still displaying a title. What's the deal?
there may be some confusion here.
When you create a custom Menu , you have to give that menu a title in Site Building > Menus > Add Menu.
You can enter whatever title you want in there ... that's just for admin purposes. (so it's not there you have to put in < none >)
Once you created your menu, that has in fact created a Block.
So now , in your Site Building > Blocks > List go to the Menu Block you just created and hit Configure ... now, there, change the Block title (it's empty at first) to < none > (without the spaces).
Title shoud be gone now.
Logic behind it:
Like I said, when you create a custom menu, Drupal in fact creates a block. so block.tpl.php is called.
In my case, the name of my menu is "MAIN" , so my candidate template file is block-menu-menu-main.tpl.php
If I take block.tpl.php and open it up there is a part that says:
if ($block->subject):
print $block->subject
endif;
Those are the lines that print out the title.
You could always remove those lines (altho the above mentioned method to remove the title should work) to be sure to get rid of the title.
After you've done that save your file to block-menu-menu-main.tpl.php in your own themes dir.
Empty Cache et voila.
If it still doesnt work for you guys , let me know , be glad to help.
If you put your Menu Block in a Panel, the Block Settings on the Panel will allow you to override the block title with <none>
. But this is not done on the Block configuration. It is done through the Panels interface. Choose "Settings" on each Menu Block inside a Panel display, then check "Override title." Sorry, this doesn't help anyone not using Panels, but if you are, it should work for you.
注释
尝试把标题
尝试把块作为标题。通常会解决它。
否则,你总是可以尝试用CSS隐藏它,即使有很多原因,你不想这样做。
你是什么意思是“尝试
你是什么意思,“尝试把块作为标题。我认为id已经做到了这一点。
Gah,忘了它会去做HTML-ish的东西
我很抱歉!
尝试将<none>放入块标题。
Ive已经做了。如果我
Ive已经做了。
如果我给块菜单的标题,那么该标题出现。如果我将其设置为,则它所代表的分类术语名称出现。
奇怪的是,顶级菜单不显示它的标题(这是我想要的)。后续菜单具有它们所属的分类术语术语的标题。
同一问题
我有同样的问题。我已经添加,它仍然显示标题。这是怎么回事?
<none>
相同
同样的问题
啊,想出来了
这里可能有一些混乱。
创建自定义菜单时,必须在“站点构建”>“菜单”>“添加菜单”中为该菜单提供标题。
你可以输入任何你想要的标题...只是为了管理目的。(所以它不是你必须放在<无>)
一旦你创建了菜单,它实际上创建了一个块。
现在,在您的网站构建>块>列表中,转到刚刚创建的菜单块,然后点击配置...现在,将块标题(它首先为空)更改为<none>(没有空格)。
标题现在消失了。
其背后的逻辑:
就像我说的,当你创建一个自定义菜单,Drupal的实际上创建了一个块。所以block.tpl.php被调用。
在我的情况下,我的菜单的名称是“MAIN”,所以我的候选模板文件是block-menu-menu-main.tpl.php
如果我把block.tpl.php和打开它有一个部分说:
if ($block->subject):
print $block->subject
endif;
这些是打印出标题的行。
你总是可以删除这些行(即使上述方法删除标题应该工作),以确保摆脱标题。
完成后,将您的文件保存到block-menu-menu-main.tpl.php在您自己的主题目录。
空缓存等。
如果它仍然不为你们工作,让我知道,很高兴帮助。
从“面板”页面覆盖标题
如果你把你的菜单块一个面板,面板上的阻止设置将让您覆盖与块标题。但这不是在块配置上做的。它是通过面板接口完成的。在Panel显示中的每个菜单块上选择“设置”,然后选中“覆盖标题”。对不起,这不会帮助任何人不使用面板,但如果你是,它应该为你工作。
<none>
谢谢
正是我在寻找!
Im using Menu Blocks. Even though ive set the ‘Block Title’ to , a title of the block is still created on the page. The title seems to be the path of the menu.
How can I remove the title?
Thanks
Comments
Try putting as the title of
Try putting as the title of the block. Usually that will resolve it.
Otherwise, you can always try hiding it with CSS, even though there are many reasons why you wouldn't want to do that.
What do you mean by 'Try
What do you mean by 'Try putting as the title of the block.'? I thought id already done this.
Gah, forgot that it was going to style HTML-ish things
My apologies!
Try putting <none> in the block title.
Ive done that already. If I
Ive done that already.
If I give the block menu's a title, then that title appears. If I set it to , then the name of the taxonomy term it represents appears.
The weird thing is the top level menu doesn't show its title (which is what I want). Subsequent menus have the title of the taxonomy term they are under.
Same Issue
I'm having the same issue. I've added
<none>
and it is still displaying a title. What's the deal?Same
same issue here
Ah , figured it out
there may be some confusion here.
When you create a custom Menu , you have to give that menu a title in Site Building > Menus > Add Menu.
You can enter whatever title you want in there ... that's just for admin purposes. (so it's not there you have to put in < none >)
Once you created your menu, that has in fact created a Block.
So now , in your Site Building > Blocks > List go to the Menu Block you just created and hit Configure ... now, there, change the Block title (it's empty at first) to < none > (without the spaces).
Title shoud be gone now.
Logic behind it:
Like I said, when you create a custom menu, Drupal in fact creates a block. so block.tpl.php is called.
In my case, the name of my menu is "MAIN" , so my candidate template file is block-menu-menu-main.tpl.php
If I take block.tpl.php and open it up there is a part that says:
if ($block->subject):
print $block->subject
endif;
Those are the lines that print out the title.
You could always remove those lines (altho the above mentioned method to remove the title should work) to be sure to get rid of the title.
After you've done that save your file to block-menu-menu-main.tpl.php in your own themes dir.
Empty Cache et voila.
If it still doesnt work for you guys , let me know , be glad to help.
Override the title from the Panels page
If you put your Menu Block in a Panel, the Block Settings on the Panel will allow you to override the block title with
<none>
. But this is not done on the Block configuration. It is done through the Panels interface. Choose "Settings" on each Menu Block inside a Panel display, then check "Override title." Sorry, this doesn't help anyone not using Panels, but if you are, it should work for you.Thank you
Just what I was looking for!
来自 https://www.drupal.org/node/673718