[英]joomla add html to menu link title
Hopefully a simple one... 希望一个简单的...
I want to add the following inside a Joomla (v2.5.4) menu link along with the link text: 我想在Joomla(v2.5.4)菜单链接以及链接文本中添加以下内容:
<i class="icon-book"></i>
Like this: 像这样:
<li>
<a href="page-name.html"><i class="icon-book"></i> Library</a>
</li>
I have tried putting the above tag inside the menu title as html, but joomla won't hold/save it and strips it out. 我尝试将上面的标签作为html放在菜单标题中,但是joomla不会保留/保存它并剥离它。
Any help/ideas? 任何帮助/想法吗?
Thanks 谢谢
Joomla won't allow any tag's in the menu title, even HTML encoded (ie & lt; etc). Joomla不允许在菜单标题中使用任何标签,即使HTML编码也是如此(即&lt;等)。 To do it the way you're wanting to you would have to use a third-party menu system that support it - there are lots around that do, you can have a look at Menu Systems section of the Joomla!
要按照您想要的方式进行操作,必须使用支持它的第三方菜单系统-周围有很多功能,您可以查看Joomla的“ 菜单系统”部分! Extensions Directory .
扩展目录 。
Otherwise, in Joomla! 否则,在Joomla中! you can use the parameters in "Link type Options" panel.
您可以在“链接类型选项”面板中使用参数。
In this case you can assign a class to the <a>
tag by putting aCSSClass
in the "Link CSS Style" parameter. 在这种情况下,可以通过将
aCSSClass
放在“链接CSS样式”参数中来为<a>
标记分配一个类。 Then your <a>
tag will render as <a class="aCSSClass" href=...
然后,您的
<a>
标记将呈现为<a class="aCSSClass" href=...
Then you can define the class in your templates CSS file and do what you want. 然后,您可以在模板CSS文件中定义类,然后执行所需的操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.