Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Mohammad Danish
How to add more than one navigation bar
5. März 2012 09:29
Antwort

Mohammad Danish

Rang: Regular Member

Nachrichten: 154

Eintrittsdatum: 5. März 2012

Neue Beiträge

Hello Everyone,
I am new to liferay .I am unable to put the navigation bar so that the menu items may be added dynamically as shown in the attachment .

I have tried putting another another navigation.vm file but it does not worked for me.can you please help me to do so.
Anhang

Anhänge: Untitled.jpg (17,0k)
Anonym
RE: How to add more than one navigation bar
5. März 2012 09:49
Antwort

Anonym

Are you wanting the child menu to show or do you want it to wrap around?
Patrick Ott
RE: How to add more than one navigation bar
5. März 2012 12:29
Antwort

Patrick Ott

Rang: New Member

Nachrichten: 16

Eintrittsdatum: 20. Februar 2012

Neue Beiträge

Hey,

this is also a point on my task-list.
I would like to add something like a navigation bar, which shows links to all my communities i have running on my server. Is there
a Portlet avalible which does this for me?

Thanks in advance,
Patrick
Mohammad Danish
RE: How to add more than one navigation bar
5. März 2012 20:34
Antwort

Mohammad Danish

Rang: Regular Member

Nachrichten: 154

Eintrittsdatum: 5. März 2012

Neue Beiträge

Thanks for your reply Wood,
Actually this not a sub menu this is another separate menu bar.
It's like menu bar 1 and another menu bar 2 on which the pages may be added.
Thank you .
Mohammad Danish
Solved:RE: How to add more than one navigation bar
17. März 2012 05:39
Antwort

Mohammad Danish

Rang: Regular Member

Nachrichten: 154

Eintrittsdatum: 5. März 2012

Neue Beiträge

Hi we have solved that problem.
What we have to do is in the navigation.vm put one more <nav>
and then specify the logic that where we want to land the page ie in 1st navigation or the 2nd navigation.
Roy Sarango
RE: Solved:RE: How to add more than one navigation bar
1. Juli 2013 13:25
Antwort

Roy Sarango

Rang: New Member

Nachrichten: 3

Eintrittsdatum: 2. Juni 2013

Neue Beiträge

Hello Varsha.
I did what you said but I'm not sure how to handle which page goes to one bar and which one goes to the second one.
Could you please give me more info on this.
Thanks
Mohammad Danish
RE: Solved:RE: How to add more than one navigation bar
1. Juli 2013 21:26
Antwort

Mohammad Danish

Rang: Regular Member

Nachrichten: 154

Eintrittsdatum: 5. März 2012

Neue Beiträge

Roy Sarango:

I did what you said but I'm not sure how to handle which page goes to one bar and which one goes to the second one.

Fristly you are to have two nav tags.
Then you are suppose to have a differentiation between the pages of the two bars.
For example in the below code we have used fn and sn to differentiate between the two pages.
If a page name starts with fn then it goes to 1st navigation bar else it goes to 2nd navigation bar.
 1
 2<nav class="sort-pages modify-pages" id="navigation">
 3   
 4
 5    <ul>
 6        #foreach ($nav_item in $nav_items)
 7        #if($nav_item.getName().substring(0,2) == "fn")
 8            
 9             #if ($nav_item.getName()=="fn-home")
10                   <li class="selected" id="navBackground" style=" padding-top: 1px;  height: 32px;">
11                              
12            #elseif ($nav_item.isSelected())
13                <li class="selected" id="nav1Button">
14            #else
15                <li id="nav1Button">
16            #end
17
18                #if ($nav_item.getName()=="fn-home")
19                    <a href="/web/guest/home" style="color:#fff;padding-left: 42px;width: 68px;" ><span style="margin-right: 15px; ">$nav_item.getName().substring(3)</span></a>
20                #else
21                    <a href="$nav_item.getURL()" $nav_item.getTarget()><span>$nav_item.icon() $htmlUtil.escape($nav_item.getName().substring(3))</span></a>
22                #end
23               
24            </li>
25            #end
26        #end
27       
28    </ul>
29</nav>
30
31<nav class="sort-pages modify-pages" id="navigation">
32   
33
34    <ul>
35        #foreach ($nav_item in $nav_items)
36        #if($nav_item.getName().substring(0,2) == "sn")
37            
38             #if ($nav_item.getName()=="sn-home")
39                   <li class="selected" id="navBackground" style=" padding-top: 1px;  height: 32px;">
40                              
41            #elseif ($nav_item.isSelected())
42                <li class="selected" id="nav1Button">
43            #else
44                <li id="nav1Button">
45            #end
46
47                #if ($nav_item.getName()=="fn-home")
48                    <a href="/web/guest/home" style="color:#fff;padding-left: 42px;width: 68px;" ><span style="margin-right: 15px; ">$nav_item.getName().substring(3)</span></a>
49                #else
50                    <a href="$nav_item.getURL()" $nav_item.getTarget()><span>$nav_item.icon() $htmlUtil.escape($nav_item.getName().substring(3))</span></a>
51                #end
52               
53            </li>
54            #end
55        #end
56       
57    </ul>
58</nav>
Roy Sarango
RE: Solved:RE: How to add more than one navigation bar
8. Juli 2013 09:28
Antwort

Roy Sarango

Rang: New Member

Nachrichten: 3

Eintrittsdatum: 2. Juni 2013

Neue Beiträge

It worked like a charm!
Thanks