CHUVASH.eu

CHunky Universe of Vigourous Astonishing SHarepoint :)

Tag Archives: drisgill

Add TreeView to Site

For all of who use Randy Drisgill’s starter masters, it won’t help if you go to Site Actions TreView and just enable it, because the DelegateControl is in a hidden panel.

To really restore the original treeview you have to copy this xml from v4.master:

<Sharepoint:UIVersionedContent runat="server" UIVersion="4">
	<ContentTemplate>
		<Sharepoint:SPNavigationManager
		id="TreeViewNavigationManagerV4"
		runat="server"
		ContainedControl="TreeView"
		CssClass="s4-treeView"
		>
		  <SharePoint:SPLinkButton runat="server" 
			NavigateUrl="~site/_layouts/viewlsts.aspx" 
			id="idNavLinkSiteHierarchyV4" 
			Text="<%$Resources:wss,treeview_header%>" 
			accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>" 
			CssClass="s4-qlheader" />
			  <div class="ms-treeviewouter">
				<SharePoint:DelegateControl runat="server" ControlId="TreeViewAndDataSource">
				  <Template_Controls>
					<SharePoint:SPHierarchyDataSourceControl
					 runat="server"
					 id="TreeViewDataSourceV4"
					 RootContextObject="Web"
					 IncludeDiscussionFolders="true"
					/>
					<SharePoint:SPRememberScroll runat="server" 
						id="TreeViewRememberScrollV4" 
						onscroll="javascript:_spRecordScrollPositions(this);" 
						style="overflow: auto;height: 400px;width: 155px; ">
					  <Sharepoint:SPTreeView
						id="WebTreeViewV4"
						runat="server"
						ShowLines="false"
						DataSourceId="TreeViewDataSourceV4"
						ExpandDepth="0"
						SelectedNodeStyle-CssClass="ms-tvselected"
						NodeStyle-CssClass="ms-navitem"
						SkipLinkText=""
						NodeIndent="12"
						ExpandImageUrl="/_layouts/images/tvclosed.png"
						ExpandImageUrlRtl="/_layouts/images/tvclosedrtl.png"
						CollapseImageUrl="/_layouts/images/tvopen.png"
						CollapseImageUrlRtl="/_layouts/images/tvopenrtl.png"
						NoExpandImageUrl="/_layouts/images/tvblank.gif"
					  >
					  </Sharepoint:SPTreeView>
					</Sharepoint:SPRememberScroll>
				  </Template_Controls>
				</SharePoint:DelegateControl>
			  </div>
		</Sharepoint:SPNavigationManager>
	</ContentTemplate>
</SharePoint:UIVersionedContent>

and paste it before:

<asp:ContentPlaceHolder id="PlaceHolderQuickLaunchBottom" runat="server">

And of course we must remove the delegatecontrol duplicate from the hidden panel:

	<!-- Usually shows the tree view but do not remove because of issue with changing views in the ribbon in publishing sites -->
	<SharePoint:DelegateControl runat="server" ControlId="TreeViewAndDataSource"></SharePoint:DelegateControl>
Вула Чăвашла

VulaCV - Чăвашла вулаттаракан сайт

Discovering SharePoint

And going crazy doing it

Bram de Jager - Coder, Speaker, Author

Office 365, SharePoint and Azure

SharePoint Dragons

Nikander & Margriet on SharePoint

Cameron Dwyer

Office 365, SharePoint, Azure, OnePlace Solutions & Life's Other Little Wonders

paul.tavares

Me and My doings!

Share SharePoint Points !

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

Aryan Nava

DevOps, Cloud and Blockchain Consultant

SPJoel

SharePoint for everyone

SharePointRyan

Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint

blksthl

Mostly what I know about SharePoint - CommunicoCuspis

SharePointDiver

SharePoint på ren svenska