Announcing the Global SNUG Board of Directors. Learn more here

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need to show My Approvals menu in the header menu of the portal all the time

sameer_paudel
Giga Contributor

Hello All,

I need to show My Approvals in service portal header menu all the time. Currently OOB it shows only when you have approvals.

In the Header menu widget and menu template - angular template I tried to make changes but its not working. Can any one help me on making changes on the template to make this behavior.

Thanks

1 ACCEPTED SOLUTION

Mihir Mohanta
Kilo Sage

1. Type sp_ng_template.LIST in the left nevigation bar.




2.Open the template named "menuTemplate".




3.Copy and paste the below Template there





<a ng-if="item.items.length == 0 && !item.scriptedItems" ng-href="{{item.href}}">{{ item.label }}</a>


<a ng-if="item.items.length > 0" href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{{ item.label }} <span class="caret"></span></a>


<ul ng-if="item.items.length > 0" class="dropdown-menu" role="menu">


      <li ng-repeat="item in item.items" ng-include="'menuTemplate'" />


</ul>


<a   ng-if="item.scriptedItems.count >= 0" href="javascript:void(0)" data-toggle="dropdown" title="{{item.hint}}">


  <span ng-bind-html="item.label"></span>


      <span ng-if="!item.scriptedItems.omitBadge" class="label label-as-badge label-primary sp-navbar-badge-count">{{item.scriptedItems.count}}</span>


</a>


<sp-dropdown-tree ng-if="item.scriptedItems.count > 0" items="item.scriptedItems.items" />


View solution in original post

5 REPLIES 5

Mihir Mohanta
Kilo Sage

1. Type sp_ng_template.LIST in the left nevigation bar.




2.Open the template named "menuTemplate".




3.Copy and paste the below Template there





<a ng-if="item.items.length == 0 && !item.scriptedItems" ng-href="{{item.href}}">{{ item.label }}</a>


<a ng-if="item.items.length > 0" href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{{ item.label }} <span class="caret"></span></a>


<ul ng-if="item.items.length > 0" class="dropdown-menu" role="menu">


      <li ng-repeat="item in item.items" ng-include="'menuTemplate'" />


</ul>


<a   ng-if="item.scriptedItems.count >= 0" href="javascript:void(0)" data-toggle="dropdown" title="{{item.hint}}">


  <span ng-bind-html="item.label"></span>


      <span ng-if="!item.scriptedItems.omitBadge" class="label label-as-badge label-primary sp-navbar-badge-count">{{item.scriptedItems.count}}</span>


</a>


<sp-dropdown-tree ng-if="item.scriptedItems.count > 0" items="item.scriptedItems.items" />


Hello Mihir I copied and pasted the code but its not working. I don' see Approvals menu on the service portal.


Hi Sameer,



Can you go to your portal -> Main menu -> Menu Items - Approvals and change a bit your script here:


find_real_file.png


to be 0 instead of 1.



Kristian!


Hello Krisitan, It's not working.