cancel
Showing results for 
Search instead for 
Did you mean: 

Customize header of Site

redraccoon
Star Contributor
Star Contributor

Hello 

I'm using Aikau to customize my headers and it's working fine

Actually I'm hiding menu if you are not an admin

widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_SITE_MEMBERS");
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_SITE_DASHBOARD");
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_SITE_CONFIGURATION_DROPDOWN");

widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_SITE_DOCUMENTLIBRARY");
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_SITE_DATA-LISTS");

1

as you can see it's not working for document library and data-lists,

when we explore the code we can see the difference of how they are created

in share-header.lib.js

2

For example the HEADER_SITE_MEMBERS is call with his name

**********

 id: "HEADER_SITE_MEMBERS",

**********

and the HEADER_SITE_DATA-LISTS 's name is created in the function with 

**********

  id: "HEADER_SITE_" + pages[i].pageId.toUpperCase(),

**********

wich I can understand, he has to create them depending of our widgets

But where i'm lost is why I can't delete them with their ID like the others ? 

I'm shure of the id because we can see it in the browser

So my questions is why are they not working the same way ? if it's a generated ID or a given ID it's not different once is in the share application ?

thank you in advance !

1 ACCEPTED ANSWER

redraccoon
Star Contributor
Star Contributor

I found a solution for my personal problem 

by switching in debug mode (I had hard time to find it, it was a module to manually deploy ) and 

"toogle developpeur mode" you can see where and how get the widget, wich help me to realized all of the menu where inside a widget

but for a person who would like only get out the "document library" menu I still wonder how ... altought this debbug mode tell us that our method is correct ...

View answer in original post

2 REPLIES 2

redraccoon
Star Contributor
Star Contributor

I found a solution for my personal problem 

by switching in debug mode (I had hard time to find it, it was a module to manually deploy ) and 

"toogle developpeur mode" you can see where and how get the widget, wich help me to realized all of the menu where inside a widget

but for a person who would like only get out the "document library" menu I still wonder how ... altought this debbug mode tell us that our method is correct ...

ddraper
World-Class Innovator
World-Class Innovator

I'm glad you were able to resolve this problem - I saw the question earlier but didn't have a chance to respond. With regards to the Developer Mode - you will always see that in the Debug Menu when Share is started with client-debug set to try in the config. The module is just an additional way of enabling it.