【问题标题】:Custom Add Applications Link isn't working自定义添加应用程序链接不起作用
【发布时间】:2011-08-12 09:45:24
【问题描述】:

我想为我的 Liferay 主题添加一个自定义的添加应用程序链接。

这是我在模板 (portlet_normal.vm) 中的内容:

            #if($show_add_content)
              <a href="javascript:$add_content_url" id="addApplications">$add_content_text</a>
              <a href="javascript:$layout_url" id="layoutTemplates">$layout_text</a>
            #end  

这是我在页面上得到的:

<a href="javascript:Liferay.LayoutConfiguration.toggle('87');" id="addApplications">Add   Application</a> 
<a href="javascript:Liferay.LayoutConfiguration.showTemplates();" id="layoutTemplates">Layout Template</a>

布局按钮按预期工作,但未加载“添加应用程序”portlet。

我想缺少库/包含?有人有想法吗?

【问题讨论】:

  • 不知道,但对必须处理 liferay 的任何人 +1...
  • @cwallenpoole 很好,如果你知道你必须在哪里打它...但有时它会非常猛烈地反击^^

标签: java themes liferay velocity


【解决方案1】:
  • 您使用的是什么版本? (在尝试复制时总是有帮助)
  • “portlet_normal.vm”是问题中的错字还是您创建的文件?它需要是portal_normal.vm
  • 您在安装过程中还做了哪些更改? vm 文件的其他更改?属性文件是否与 javascript 文件相关?
  • 您是否尝试过其他浏览器?
  • id(在“a”元素中给出)是否唯一?

【讨论】:

    【解决方案2】:

    您是否尝试过解决方案 http://www.liferay.com/community/wiki/-/wiki/Main/Link+to+Dockbar

    addApplication 对我有用。但是布局模板链接不起作用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-05
      • 1970-01-01
      • 2017-06-14
      相关资源
      最近更新 更多