Quick Navigation Addon for CMS 12 .net6

This popular (10 000+ downloads) addon helps you add menu items the QuickNavigationMenu in a super easy way

Published 30 Aug 2022
For Optimizely CMS and Commerce Version 12/14

An Optimizely addon that helps and adds menu items to the QuickNavigationMenu when logged in on public site, All configurable links to Search & navigation, admin, admin content type, and logout. Even custom links!

alt text

**This is the .net 6 version of : https://github.com/LucGosso/Gosso.EPiServerAddOn.QuickNavExtension ** <– use this for CMS 11

Installation and configuration

Available on nuget.optimizely.com https://nuget.optimizely.com/package/?id=Epicweb.Optimizely.QuickNavExtension

This can be installed via the package manager console in Visual Studio.

Run “install-package Epicweb.Optimizely.QuickNavExtension” in package manager console.

Default menus are Admin and logout, to activate other menu items apply this appsettings.json: (they are sortable)

"Epicweb.QuickNav": "find,admin,contenttype,logout"

You can add custom menu items, Name and url with pipe in between. Name can be resource path eg /shell/admin/logout

"Epicweb.QuickNav": "Custom
link|https://devblog.gosso.se,Custom Javascript|javascript:alert('Hey
you'),find,admin,contenttype,logout"

To only show logout item, apply this appsettings:

"Epicweb.QuickNav": "logout"

Alternate way to register links:

Startup.cs


using Epicweb.Optimizely.QuickNavExtension;

   //add links in a simple way in startup. 
   services
       .AddQuickNav("Custom link", "https://devblog.gosso.se/", role: "WebDevs")
       .AddQuickNav("Custom Javascript", "javascript:if(confirm(\'R U SURE?\')){document.location=\'/\';}", role: "WebDevs")
       .AddQuickNav(QuickNavigator.FIND)
       .AddQuickNav(QuickNavigator.Admin)
       .AddQuickNav(QuickNavigator.ContentType)
       .AddQuickNav(QuickNavigator.LogOut);
           

Role Base Links

You can add a third pipe with rolename from Epi.

eg: “Link title|/urlForDevsOnly/|WebDevs” <= only WebDevs will see the menu

OR

“logout||WebEditors” <= only WebEditors will see the logout menu

OR

services.AddQuickNav("Custom link", "/mysite/", role: "WebDevs")

SEO Tems

  • How To Add A Link Into The QuickNavigatorMenu in Optimizely

About the author

Luc Gosso
– Independent Senior Web Developer
working with Azure and Optimizely

Twitter: @LucGosso
LinkedIn: linkedin.com/in/luc-gosso/
Github: github.com/lucgosso

Leave a Reply

Your email address will not be published. Required fields are marked *