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?
Add a comment |
1 Answer
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
- It works! Strange that this problem has not fixed yet, it is present since sp2010Nk SP– Nk SP2014-07-24 07:13:30 +00:00Commented Jul 24, 2014 at 7:13
- I have a question and solution about it here too: sharepoint.stackexchange.com/questions/73174/… It's definitely a bug.bgmCoder– bgmCoder2014-08-12 03:08:26 +00:00Commented Aug 12, 2014 at 3:08