在 liferay 中对布局和菜单链接进行分类
我正在通过带有友好网址的挂钩安装布局
,如下
/cat1/link1、/cat1/link2
和
/cat2/link3、/cat2/link4
我希望它以这样的方式,当我导航到 cat1/link1 时,
导航链接应该是link1 和 link2
以及当我导航到 cat2/link3 时
导航链接应该是 link3 和 link4
我怎样才能实现这个?
或者任何人都可以建议我如何在同一 liferay 安装中将多个站点的布局分组为不同的类别?
谢谢..
I am installing layouts through the hook
with friendly url as follows
/cat1/link1, /cat1/link2
and
/cat2/link3, /cat2/link4
I want it insuch a way that when I navigate to cat1/link1
The nav links should be link1 and link2
and when i navigate to cat2/link3
The nav links should be link3 and link4
How can i achive this?
or can anyone suggest how can i group the layouts for multiple sites into different categories in same liferay install?
Thanks..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
创建组织(来自 Seven-cogs
StartupAction.java
)您确定需要两个组织而不是两个社区吗?
评论中问题的更新:
要获取主题中的组织名称(velovity),您可以使用(如果您在组织的页面(组)中)
在portal-ext.properties中
在主题vm文件
Liferay 6
Liferay 5.x
编辑:
如果您的用户是您可以使用的组织的成员
请注意,用户可以是多个组织的成员,您将获得所有组织。
To create organization (this is from seven-cogs
StartupAction.java
)Are you sure that you need two organizations and not two communities?
UPDATE for question in comment:
To get organization name in theme (velovity) you can use (if you are in organization's pages (group))
In portal-ext.properties
In theme vm file
Liferay 6
Liferay 5.x
EDIT:
If your user is member of organization(s) than you can use
Take note that user can be member of multiple organizations and you will get all of them.
关于代码您需要了解的内容:
在马丁提到的同一类中,我已经组合了可以实现您需要的代码的组合。
请注意,某些变量未定义。您必须使用 Liferay 安装特有的正确值。例如,userId 可以是任何人,但我建议使用默认用户的 userId 或管理员的 userId。
代码:
What you need to know about the code:
From the same class Martin mentioned I've put together a mix of code that will achieve what you need.
Note that some of the variables are not defined. You'll have to use the correct values that are particular to your Liferay installation. For example, the userId could be anyone but I would suggest using either the default user's userId or an administrator's userId.
The Code: