web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / How do you add a secon...
Power Pages
Answered

How do you add a secondary navigation to a portal?

(0) ShareShare
ReportReport
Posted on by 84

My portal currently has a primary navigation in the header and a secondary navigation that I added manually in my custom header.

 

JeroenJanssens_0-1669206534798.png

 

 

 </div>
 <div class="container-sgw" >
 <div class="container" >
 <ul class="nav-sgw navbar-nav2-sgw main-menu-sgw-search">
 <li><a href="https://www.sint-gillis-waas.be/zoeken" ><span class="material-icons-nav-sgw"></span></a></li>
 </ul>
 <ul class="nav-sgw navbar-nav2-sgw main-menu-sgw">
 <li><a href="https://www.sint-gillis-waas.be/wonen-en-leven" ><span class="nav-item-sgw">Wonen en Leven</span><span class="nav-item-border-sgw"></span></a></li>
 <li><a href="https://www.sint-gillis-waas.be/vrije-tijd" ><span class="nav-item-sgw">Vrije Tijd</span><span class="nav-item-border-sgw"></span></a></li>
 <li><a href="https://www.sint-gillis-waas.be/welzijn-2" ><span class="nav-item-sgw">Welzijn</span><span class="nav-item-border-sgw"></span></a></li>
 <li><a href="https://www.sint-gillis-waas.be/bestuur-en-beleid" ><span class="nav-item-sgw">Bestuur en Beleid</span><span class="nav-item-border-sgw"></span></a></li>
 </ul>
 </div>
 </div>
</div>

 

Can I use the "Secondary Navigation" Web Link Set for this instead?  If so, what code do I need to add to my custom header?

 

Categories:
I have the same question (0)
  • Verified answer
    mago_00 Profile Picture
    44 on at

    Hi,

     

    You can do something similar below to render your web link record using liquid templates

    {% assign nav = weblinks[Custom Navigation] %}
    
    {% if nav %}
    
    <h1>{{ nav.title | escape }}</h1>
    	<ul class="nav-sgw navbar-nav2-sgw main-menu-sgw">
    
    		{% for link in nav.weblinks %}
    		<li>
    			<a href={{ link.url | escape }} title={{ link.tooltip | escape }}></a><span class="nav-item-sgw">{{ link.name | escape }}</span>
    		</li>
    		{% endfor %}
    	</ul>

     

     

  • JeroenJanssens Profile Picture
    84 on at

    That got me started!   The final code I made is the following:

     

     <div class="container-sgw" >
     <div class="container" >
     <ul class="nav-sgw navbar-nav2-sgw main-menu-sgw-search">
     <li><a href="https://www.sint-gillis-waas.be/zoeken" ><span class="material-icons-nav-sgw"></span></a></li>
     </ul>
     {% assign secondary_nav_name = "Secondary navigation SGW" %}
     {% assign secondary_nav = weblinks[secondary_nav_name] %}
     {% if secondary_nav %}
     <ul class="nav-sgw navbar-nav2-sgw main-menu-sgw">
     		{% for link in secondary_nav.weblinks %}
     		<li>
    			 <a href={{ link.url | escape }} title={{ link.tooltip | escape }}><span class="nav-item-sgw">{{ link.name | escape }}</span><span class="nav-item-border-sgw"></span></a>
    		 </li>
    		 {% endfor %}
     {% endif %}
     </ul>
     </div>
     </div>

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Valantis Profile Picture

Valantis 49

#2
11manish Profile Picture

11manish 33

#3
Haque Profile Picture

Haque 28

Last 30 days Overall leaderboard