掲示板
Sub of sub page link not appear
14年前 に Andri Novian によって更新されました。
Sub of sub page link not appear
New Member 投稿: 4 参加年月日: 07/12/10 最新の投稿
I use liferay.5.2.3 with tomcat 6 bundling.
First i create page and then i create a children from page and that's no problem with page menu link, but if i create children from a children page this link menu not appears except in "Site map" portlet this all tree link show as i supposed to do.
the question is how to create a second,third,etc. level tree menu appears in liferay menu
First i create page and then i create a children from page and that's no problem with page menu link, but if i create children from a children page this link menu not appears except in "Site map" portlet this all tree link show as i supposed to do.
the question is how to create a second,third,etc. level tree menu appears in liferay menu
14年前 に Juan Fernández によって更新されました。
RE: Sub of sub page link not appear
Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
I think this is a theme question
Do some research in that direction
Regards
Juan Fernández
Do some research in that direction
Regards
Juan Fernández
14年前 に Arvind Mishra によって更新されました。
RE: Sub of sub page link not appear
Regular Member 投稿: 226 参加年月日: 08/02/13 最新の投稿
navigation.vm inside the themes creates children for pages.May be thats the best place to look for.
thanks
arvind
thanks
arvind
14年前 に Andri Novian によって更新されました。
RE: Sub of sub page link not appear
New Member 投稿: 4 参加年月日: 07/12/10 最新の投稿
For All,
Thanks for advice, i has solve this problem with add code for loop child menu in navigation.vm
regards,
Andri
Thanks for advice, i has solve this problem with add code for loop child menu in navigation.vm
regards,
Andri
12年前 に Path Finder LifeRay によって更新されました。
RE: Sub of sub page link not appear
Expert 投稿: 262 参加年月日: 09/09/18 最新の投稿
Hi Andri,
I have the same problem in my application. I want to show the 2nd level menu. Can you guide me the code in vm files to make 2nd level menu visible. Its very Urgent for me now.
Thanks in advance,
Path Finder
I have the same problem in my application. I want to show the 2nd level menu. Can you guide me the code in vm files to make 2nd level menu visible. Its very Urgent for me now.
Thanks in advance,
Path Finder
12年前 に Iulian Vieru によって更新されました。
RE: Sub of sub page link not appear
New Member 投稿: 5 参加年月日: 10/05/17 最新の投稿
from navigation.vm
same way you can go to any level
#foreach ($nav_item in $nav_items)
##level one
<a href="$nav_item.getURL()" $nav_item.gettarget()>
<span>$nav_item.icon() $htmlUtil.escape($nav_item.getName())</span>
</a>
#if ($nav_item.hasChildren())
##level 2
#foreach ($nav_child in $nav_item.getChildren())
<a href="$nav_child.getURL()" $nav_child.gettarget()>$nav_child.getName()</a>
#end
#end
##end level 2
#end
##end level one
same way you can go to any level
12年前 に Path Finder LifeRay によって更新されました。
RE: Sub of sub page link not appear
Expert 投稿: 262 参加年月日: 09/09/18 最新の投稿
Hi Iulian Vieru,
Thanx for your reply. But that is limited to only 1 step, since nav_item is for main menu and nav_child is for drop down items. How would we go with 2nd level(sub items of drop down). I tried with adding another loop with nav_sub_child in place of nav_child. But thats not coming in right direction. If you have any example code for the next level please post it once,
Thanks in advance,
Path Finder
Thanx for your reply. But that is limited to only 1 step, since nav_item is for main menu and nav_child is for drop down items. How would we go with 2nd level(sub items of drop down). I tried with adding another loop with nav_sub_child in place of nav_child. But thats not coming in right direction. If you have any example code for the next level please post it once,
Thanks in advance,
Path Finder
12年前 に Iulian Vieru によって更新されました。
RE: Sub of sub page link not appear
New Member 投稿: 5 参加年月日: 10/05/17 最新の投稿
The direction you took is the correct one. A loop trough the children of the what you call drop-down items. First is best to understand that these velocity variables are in fact references to java objects, so $nav_item references to a com.liferay.portal.model.Layout instance. So, to get a list of all children of $nav_item, we do it same way as for the Layout object, using getChildren() method.
in java we would do something like this :
Same thing in velocity:
So, what you need to do is to get the children of the parent item up to whatever level suits your requests. Here is an update to the example i gave above, where you get the next level:
in java we would do something like this :
Layout parentLayout;
.....
List<layout> childrenLayouts=parentLayout.getChildren();</layout>
Same thing in velocity:
$childrenLayouts=$parentLayout.getChildren()
So, what you need to do is to get the children of the parent item up to whatever level suits your requests. Here is an update to the example i gave above, where you get the next level:
#foreach ($nav_item in $nav_items)
##level one
<a href="$nav_item.getURL()" $nav_item.gettarget()>
<br>level 1 <span>$nav_item.icon() $htmlUtil.escape($nav_item.getName())</span>
</a>
#if ($nav_item.hasChildren())
##level 2
#foreach ($nav_child in $nav_item.getChildren())
<br>--level2<a href="$nav_child.getURL()" $nav_child.gettarget()>$nav_child.getName()</a>
#if ($nav_child.hasChildren())
##level 3
#foreach($nav_child3 in $nav_child.getChildren())
<br>----level3<a href="$nav_child3.getURL()" $nav_child3.gettarget()>$nav_child3.getName()</a>
#end
#end
#end
#end
##end level 2
#end