I'm trying to add a basic link below my Calendar page without using any web parts. I noticed that when adding another web part to the Calendar page, the view dropdown in the browse tab ribbon UI disappears. I'd like to keep the view options and add a link below the calendar. Any methods to accomplish this?
Go to the list view .aspx file and go to line 12 which has
<SharePoint:ListTitleViewSelectorMenu AlignToParent="true" id="LTViewSelectorMenu" runat="server" />
Replace with this code
<SPAN id=onetidPageTitleSeparator><SPAN><SPAN style="POSITION: relative; WIDTH: 11px; DISPLAY: inline-block; HEIGHT: 11px; OVERFLOW: hidden"><IMG style="POSITION: absolute; BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; TOP: -585px !important; LEFT: 0px !important" alt=: src="/_layouts/images/fgimg.png"></SPAN></SPAN></SPAN> <SharePoint:ViewSelectorMenu ID="viewSelectorMenu1" runat="server" />
It should show the view dropdown even with a content editor web part.
You could either use ClientScriptManager to register it or can use Controls also
ClientScriptManager clientScript = this.Page.ClientScript; clientScript.RegisterClientScriptBlock(this.GetType(), "key", "script");
Use the following js script to add the link.
$('#AsynchronousViewDefault_CalendarView').append("<div><a href=''>your link</a></div>");