omaehitaja

Hi!

I have created a custom site definition following exactly the path layed out here: http://www.sharepointblogs.com/tbaginski/archive/2006/05/31/8013.aspx. Now I have a problem customizing default.master on a site. I have treeview enabled and quick launch disabled. Now when I go to Sharepoint Designer (2007) and edit the default.master then I can change the properties for the treeview displayed on the left part of the page. If I change the ExpandDepth value from 0 to 1 for example, then it works and two levels are displayed by default, if I click on the document library itself. Now I also have subfolders in the document library and for some reason, they are not shown anymore, not even a plus sign beside the folder containing the subfolders. If I'm viewing a page that uses the default.master, everything is OK. Now when I look at the allitems.aspx page of the document library in sharepoint designer, then I get the following error message instead of the tree view (which works fine on the default.master page):
TreeView
-WebTreeView
Error parsing control: Could not bind to the 'EncodedName' property (specified by TextField) while data binding TreeView. Please check the Bindings fields.
Here is the relevant source from SD in default.master:
<Sharepoint: SPNavigationManager
id="TreeViewNavigationManager"
runat="server"
ContainedControl="TreeView">
<table class="ms-navSubMenu1" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<table class="ms-navheader" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td nowrap id="idSiteHierarchy">
<SharePoint: SPLinkButton runat="server" NavigateUrl="~site/default.aspx" id="idNavLinkSiteHierarchy" Text="<%$Resources:wss_juhtsyst,treeview_header%>" AccessKey="<%$Resources:wss_juhtsyst,quiklnch_allcontent_AK%>" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<div class="ms-treeviewouter">
<SharePoint: SPHierarchyDataSourceControl runat="server" id="TreeViewDataSource" RootContextObject="Web" IncludeDiscussionFolders="true" />
<SharePoint: SPRememberScroll runat="server" id="TreeViewRememberScroll" onscroll="javascript:_spRecordScrollPositions(this);" Style="overflow: auto;height: 400px;width: auto; ">
<SharePoint: SPTreeView id="WebTreeView" runat="server" ShowLines="false" DataSourceId="TreeViewDataSource" ExpandDepth="0" SelectedNodeStyle-CssClass="ms-tvselected" NodeStyle-CssClass="ms-navitem" NodeStyle-HorizontalPadding="2" SkipLinkText="" NodeIndent="12" ExpandImageUrl="/_layouts/images/tvplus.gif" CollapseImageUrl="/_layouts/images/tvminus.gif" NoExpandImageUrl="/_layouts/images/tvblank.gif">
</SharePoint: SPTreeView>
</SharePoint: SPRememberScroll>
</div>
</Sharepoint: SPNavigationManager>

Has anybody tried playing with the treeview My problem is, that I want the treeview to display all subfolders properly (this, it SHOULD do) AND I want it to display the treeview if I'm currently in one of the subfolders, so that the root object would be at all times, the document library itself.


Re: SharePoint - Development and Programming Treeview navigation broken after edting default.master

Eric Portney

I am having a similar problem with SPTreeView (not being able to set the RootNode to display regardless of where I am in the site hierarchy.

Have you solved this yet If so, how

Thanks,
Eric




Re: SharePoint - Development and Programming Treeview navigation broken after edting default.master

omaehitaja

Well since I had to show the treeview expanded by default, then my solution (a robust and uncomplete one) was to modify the master file so that the expanddepth was set to 2, to also display subfolders. For some reason it didn't show subfolders on one of the primary folders in the treeview, until I added a new subfolder next to the ones already there. If I deleted the newly made subfolder, the treeview wouldn't show any subfolders again... as to why, I have no idea. Since the treeview is set on the master page, then all other pages (folders) that are not administrative pages (site layout and so on) show the treeview correctly. Now when I click on the document library directly, then the treeview is gone.. I didn't find practically any documentation whatsoever on the matter on the internet. It seems that only a few of us have tinkered with it so far. It would be nice if MS provided some additional documentation about handling or customizing the treeview on sharepoint sites, because there is some information about customizing it when you're displaying the treeview from another data source. If you find anything, let me know.

Regards

Timo





Re: SharePoint - Development and Programming Treeview navigation broken after edting default.master

Praveen battula

Hi omaehitaja,

i am facing the same problem, how to solve it, i wasted lot of time.

i like to show the sites, subsites and pages in tree view format. but it is giving the error, which u given. is there any way other than this. i did by using tree view but it is showing only sites and subsites, but not Pages in the site.

i need to show sites as well as pages.

please help me. i need tree view finally.

if any one replies to me it's really great help.

thanks.
Praveen