I added a script editor web part (javascript code) to a view page (/Forms/AllItems.aspx).
After that I can not see anymore the File and List category in the ribbon bar.
I read somewhere that with custom code the page became an application page (before was list page).
Clicking on the focus of the list solve the problem
How can I make always visible that ribbon items by code?
Asked
Active
Viewed 1,252 times
3
Waqas Sarwar MVP
- 57,008
- 17
- 43
- 79
Nk SP
- 2,893
- 6
- 39
- 62
1 Answers
2
I've had this problem before and never explored a solution until now.
Don't use the script editor, instead just open the view aspx within SharePoint Designer and in 'PlaceHolderAdditionalPageHead' you can add your script without loosing the ribbon. Tested in SP 2013 on AllItems.aspx
<asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
<script>
alert('Ribbon still present!');
</script>
<SharePoint:RssLink runat="server"/>
</asp:content>
thx for asking
Michael Colbs
- 3,919
- 2
- 48
- 96
-
It works! Strange that this problem has not fixed yet, it is present since sp2010 – Nk SP Jul 24 '14 at 07:13
-
I have a question and solution about it here too: http://sharepoint.stackexchange.com/questions/73174/items-and-list-tabs-in-ribbon-dont-show-after-editing-page/109714?iemail=1&noredirect=1#109714 It's definitely a bug. – bgmCoder Aug 12 '14 at 03:08