Typoscript:带按钮的自定义 HMENU
我做了一个像这样的菜单:
lib.mainMenu = HMENU
lib.mainMenu {
entryLevel = 0
1 = TMENU
1 {
NO.allWrap = <div id="forsideknap">|</div> || <div id="butikker">|</div> || <div id="nyheder">|</div> || <div id="arrangementer">|</div> || <div id="avis">|</div>
}
}
它在我的页面上看起来像这样:
,您可以看到每个页面名称和链接位于每个 div 的前面。如何将每个页面元素分配给其特定的 div 元素?换句话说,我需要删除前面的文本,因此当您单击 div 图像时,它具有与单击生成的链接相同的功能。
I have made a HMENU like this:
lib.mainMenu = HMENU
lib.mainMenu {
entryLevel = 0
1 = TMENU
1 {
NO.allWrap = <div id="forsideknap">|</div> || <div id="butikker">|</div> || <div id="nyheder">|</div> || <div id="arrangementer">|</div> || <div id="avis">|</div>
}
}
and it is looking like this on my page:
as you can see the each page name and link is infront of each div. How do i assign each page element to its specific div element ? in other words, i need to get rid of the text infront, so when you click on the div image it has the same functionality as if you clicked on the links which are generated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以设置 NO.doNotShowLink = 1 来隐藏完整的 A 标签(DIV 换行仍将呈现)。
或者您可以通过 CSS 来完成此操作。例如,通过在 A 标记上设置以下属性:
可能还需要为 A 标记设置
宽度
,以使overflow:hidden
发挥作用。You can either set
NO.doNotShowLink = 1
to hide the complete A-tag (the DIV-wrap will still be rendered).Or you can do this via CSS. By setting for example the following properties on the A-tag:
It might also be required to set a
width
for the A-tag, for theoverflow: hidden
to work.