Discussions
Activity
Sign In
How it works
Newscoop Support
Two-level Menu
Vote Up
0
Vote Down
Andrei S.
November 2014
Posts: 117
Member
I want:
first level (class="nav sections-menu") = "$gimme->section->name"
2nd level (class="dropdown-menu profile-dropdown") = "$gimme->article->name"
Helpme to edit header.tpl.
<ul class="nav sections-menu">
{{ local }}
{{ set_current_issue }}
{{ list_sections }}
<li {{ if $currentsection == $gimme->section->number }}class="active"{{ /if}}>
<a href="{{ uri options="section"}}">
{{ $gimme->section->name }}
<ul class="dropdown-menu profile-dropdown">
<li>
<a href="{{ uri options="section"}}">$gimme->article->name
</a>
</li>
</ul>
</a>
</li>
{{ /list_sections }}
{{ /local }}
</ul>
Is it right?
header.tpl
12K
Post edited by Andrei S. at 2014-11-11 03:52:46
1 Comment
sorted by
Votes
Date Added
Vote Up
0
Vote Down
ljuba rankovic
November 2014
Posts: 156
Member
Hi,
yes this may work; you will need to assign value to custom variable $currentsection before the loop with
{{ assign var="currentsection" value=$gimme->default_section->number }}
and of course for second-level items, put $gimme->article->name into double curly barackets too
:)
--
Ljuba Rankovic
Senior Front End Developer, Sourcefabric
ljuba.rankovic@sourcefabric.org
http://www.sourcefabric.org
http://www.twitter.com/Sourcefabric
Add a Comment
Start a New Discussion
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
8,397
Sourcefabric
↳
Announcements
25
Newscoop
↳
Newscoop Support
2,189
↳
Newscoop Development
722
↳
Newscoop Security
13
↳
Newscoop Documentation
17
↳
Newscoop Themes
69
Airtime
↳
Airtime Support
3,139
↳
Airtime Development
1,286
↳
Airtime Français
146
↳
Airtime Documentation
14
↳
Airtime Hacks
102
↳
Promote your station!
37
↳
Airtime Security
11
Booktype
↳
Booktype Support
277
↳
Booktype Development
55
↳
Booktype Documentation
7
Superdesk
↳
Superdesk Development
264
↳
Web Publisher
21
Poll
No poll attached to this discussion.
Top Posters
Albert FR
1978
Martin Konecny
1860
Andrey Podshivalov
1526
Voisses Tech
1423
John Chewter
899
Daniel James
844
Roger Wilco
784
hoerich
627
Paul Baranowski
389
Cliff Wang
339