留言板

accessing navigation.vm in web content template.

Rehan Khan,修改在7 年前。

accessing navigation.vm in web content template.

New Member 帖子: 2 加入日期: 16-11-30 最近的帖子
Hi everyone,

I want to access navigation.vm file in web content template.

Is this possible? If so please provide me a solution. and if not possible what is alternate to this?

Thanks in advance
thumbnail
Samuel Kong,修改在7 年前。

RE: accessing navigation.vm in web content template.

Liferay Legend 帖子: 1902 加入日期: 08-3-10 最近的帖子
You're referring to the navigation.vm in the theme, correct?

Not possible.

Instead of trying to load the theme's VM file (and I'm not sure why you would want to do this), just add the logic you want to the web content template.
Rehan Khan,修改在7 年前。

RE: accessing navigation.vm in web content template.

New Member 帖子: 2 加入日期: 16-11-30 最近的帖子
thanks Samuel Kong for your quick response,
Yes exactly i am telling about the theme vm file.

Why i am doing this because we have two type of menu i.e horizontal (up to 2 level) and vertical menu (from 3rd to 4th level).
the vertical menu should be display inside the content div.

Now if i add the .vm for the vertical menu inside the content div. this will disturb the layout for other pages which dont have a 3rd and 4th level menu.

Hope you understand.
I have only one theme.
thumbnail
Samuel Kong,修改在7 年前。

RE: accessing navigation.vm in web content template.

Liferay Legend 帖子: 1902 加入日期: 08-3-10 最近的帖子
You probably shouldn't try to include the menu in a web content.

If your 3rd/4th level menu is a part of the theme, then it should go in your theme. However, if it's a part of your theme, you won't be able to include it within your content div. It's just not possible unless you use some sort of client side JS to move the menu.

If you really want it within your content div, you can try using adding a Navigation portlet. However, you'll have to manually add this to every page that needs it.