自定义主页面中的登录链接

huangapple go评论83阅读模式
英文:

Sign-in link in custom master page

问题

我正在学习使用Liferay DXP 7.4构建站点和页面,使用主题书、自定义主页面等等。

尽管进行了广泛的搜索,但我无法找到如何在我的自定义主页面中使用默认登录链接(登录Portlet打开登录弹出窗口)的方法。

我只能嵌入弹出窗口内容本身(小部件/工具/登录,即完整的登录表单),但不能像默认主题中使用的那样嵌入链接(而且此页头代码是只读的,因此我无法分析它)。

有没有提示如何在自定义主页面中使用登录链接(而不是表单)?

英文:

I'm learning site and page building with Liferay DXP 7.4 using theme books, custom master page and so on.

Even after extensive searching I could not find how to use the default login link (login portlet opening the login popup) in my custom master page.

I can just embed the popup content itself (widgets / tools / sign in, which is the comlete login form) but not the link as used in the default theme (and this page header code is read only, so I cannot analyze it).

Any hints how to use the sign in link (not the form) in a custom master page?

答案1

得分: 0

我找到了,创建了一个带有特殊Freemarker语法的片段([]而不是<>),并在主模板中使用了它。

  1. <div class="fragment_101">
  2. [@liferay.user_personal_bar /]
  3. </div>
英文:

Found it, created a Fragment with special Freemarker Syntax ([] instead of <>) and used it in master page template.

  1. &lt;div class=&quot;fragment_101&quot;&gt;
  2. [@liferay.user_personal_bar /]
  3. &lt;/div&gt;

huangapple
  • 本文由 发表于 2023年8月10日 20:56:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/76875932.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定