Liferay 6 创建“添加页面”链接位于停靠栏之外

发布于 2024-12-16 13:21:01 字数 155 浏览 2 评论 0原文

是否可以在停靠栏之外复制“添加页面”链接?

通过将 javascript 添加到 main.js,可以在停靠栏外部复制“添加应用程序”、“控制面板”、“切换控件”和“页面布局”链接。

这个问题在 Liferay 论坛上还没有得到解答,所以我想我可以在这里尝试一下。

Is it possible to replicate the 'add page' link outside of the dockbar?

It is possible to replicate the 'add application', 'control panel', 'toggle controls' and 'page layout' links outside of the dockbar by adding javascript to main.js.

This question hasn't been answered on the Liferay forums as yet so I thought I'd try here.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青瓷清茶倾城歌 2024-12-23 13:21:01

以下内容适用于 Liferay 6.1(早期版本有所不同,但这是一个起点):

  1. 控制面板

    您可以使用以下网址:

    http://yourliferaysite.com/group/control_panel?doAsGroupId={groupId} &refererPlid={plid}

    {groupId} 替换为社区的群组 ID
    您当前正在访问,并将 {plid} 替换为
    您当前所在的页面(布局)。请注意,plid 是
    不是布局 ID,可以在布局表的数据库中找到。

  2. 编辑控件/切换控件

    您需要从以下 CSS 类中添加和删除
    标签。

    课程是

    • controls-hidden:此 CSS 类隐藏控件
    • controls-visble:此 CSS 类显示控件

    使用 jQuery 的 addClass 可以轻松添加和删除这些内容
    和removeClass方法。

    $('body').removeClass('controls-visible').addClass('controls-hidden');
    

    这将隐藏控件,反之亦然将显示
    控制。

    或使用 Alloy UI:

    AUI().use('节点', 函数(A) {
        A.one('body').replaceClass('controls-visible','controls-hidden');
    }
    
  3. 添加页面

    恐怕这个我也不知道该怎么办。必须将其埋葬
    Alloy UI 库中的某个地方,但我无法调试它是如何工作的!
    抱歉!

希望前两个会很有用!

The following are for Liferay 6.1 (earlier versions my differ but it's a starting point):

  1. Control Panel

    You can use the following URL:

    http://yourliferaysite.com/group/control_panel?doAsGroupId={groupId}&refererPlid={plid}

    Where you replace {groupId} with the Group ID of the community
    you're currently accessing, and replace {plid} with the plid of
    the page (layout) that you're currently on. Note that the plid is
    NOT the Layout Id and can be found in the database in the layout table.

  2. Edit Controls / Toggle Controls

    You need to add and remove the following CSS classes from the
    <body> tag.

    The classes are

    • controls-hidden : This CSS class hides the controls
    • controls-visble : This CSS class shows the controls

    These can both be added and removed easily using jQuery's addClass
    and removeClass methods.

    $('body').removeClass('controls-visible').addClass('controls-hidden');
    

    This will hide the controls, and the vice versa will show the
    controls.

    or using Alloy UI:

    AUI().use('node', function(A) {
        A.one('body').replaceClass('controls-visible','controls-hidden');
    }
    
  3. Add Page

    I'm afraid this I also don't know how to do. It must be buried
    somewhere in the Alloy UI libraries but I can't debug how it works!
    Sorry!

Hopefully the first two will prove useful!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文