Chris Duden
Top achievements
Rank 1
Chris Duden
asked on 12 Mar 2009, 09:10 PM
Can someone explain to me how to get this structure:
toplevel
-sublevel 1 site 1
-sublevel 1 site 2
--sublevel 2 site 1
to display like this using the radtabstrip:
toplevel | sublevel 1 site 1 | sublevel 1 site 2
sublevel 2 site 1
I followed the instructions for getting all this to work binding to the SiteMapDataSource. It displays but it always shows up this way:
toplevel
sublevel 1 site 1 | sublevel 1 site 2
sublevel 2 site 1
Consequently I always have one and only one tab (toplevel)...not very useful. I could care less about the toplevel showing up at all. I want the subsites to be my top tabs. I tried setting the ShowStartingNode="false" and even played with the offset on the datasource but it doesn't seem to change a thing.
toplevel
-sublevel 1 site 1
-sublevel 1 site 2
--sublevel 2 site 1
to display like this using the radtabstrip:
toplevel | sublevel 1 site 1 | sublevel 1 site 2
sublevel 2 site 1
I followed the instructions for getting all this to work binding to the SiteMapDataSource. It displays but it always shows up this way:
toplevel
sublevel 1 site 1 | sublevel 1 site 2
sublevel 2 site 1
Consequently I always have one and only one tab (toplevel)...not very useful. I could care less about the toplevel showing up at all. I want the subsites to be my top tabs. I tried setting the ShowStartingNode="false" and even played with the offset on the datasource but it doesn't seem to change a thing.
17 Answers, 1 is accepted
0
Hello Chris Duden,
I guess you want to achieve something like this. If yes here is the markup which we have used to create the aforementioned MOSS page:
<telerik:RadTabStrip runat="server" ID="RadTabStrip1" DataSourceID="siteMapDataSource1" Skin="Web20"/>
<PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server"
SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true"
StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false"
TreatStartingNodeAsCurrent="true" TrimNonCurrentTypes="Heading"/>
I hope this helps,
Albert
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I guess you want to achieve something like this. If yes here is the markup which we have used to create the aforementioned MOSS page:
<telerik:RadTabStrip runat="server" ID="RadTabStrip1" DataSourceID="siteMapDataSource1" Skin="Web20"/>
<PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server"
SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true"
StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false"
TreatStartingNodeAsCurrent="true" TrimNonCurrentTypes="Heading"/>
I hope this helps,
Albert
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Chris Duden
Top achievements
Rank 1
answered on 13 Mar 2009, 10:40 PM
That did the trick. Follow up question. It works for a publishing portal (master page based upon something like blueband.master) but what about a collaboration publishing portal like default.master. That masterpage has the following datasource:
<asp:SiteMapDataSource
ShowStartingNode="False"
SiteMapProvider="SPNavigationProvider"
id="topSiteMap"
runat="server"
StartingNodeUrl="sid:1002"/>
instead of
<PublishingNavigation:PortalSiteMapDataSource .../>
the asp:sitemapdatasource doesn't have the same properties and it doesn't seem to work (it ignores any properties set on it).
Thanks for your help.
<asp:SiteMapDataSource
ShowStartingNode="False"
SiteMapProvider="SPNavigationProvider"
id="topSiteMap"
runat="server"
StartingNodeUrl="sid:1002"/>
instead of
<PublishingNavigation:PortalSiteMapDataSource .../>
the asp:sitemapdatasource doesn't have the same properties and it doesn't seem to work (it ignores any properties set on it).
Thanks for your help.
0
Accepted
Hi Chris Duden,
The SPNavigationProvider seems to always returns the top ("Home") item. The built-in MOSS menu is aware of this behavior and renders the "Home" item as if it were child item. Unfortunately RadTabStrip cannot handle this case and renders the Home item as root item with child tabs. It seems however that you can use a PortalSiteMapDataSource in this case and achieve the desired results. I've tested this by adding the PortalSiteMapDataSource control in default.master.
Greetings,
Albert
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
The SPNavigationProvider seems to always returns the top ("Home") item. The built-in MOSS menu is aware of this behavior and renders the "Home" item as if it were child item. Unfortunately RadTabStrip cannot handle this case and renders the Home item as root item with child tabs. It seems however that you can use a PortalSiteMapDataSource in this case and achieve the desired results. I've tested this by adding the PortalSiteMapDataSource control in default.master.
Greetings,
Albert
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Chris Duden
Top achievements
Rank 1
answered on 16 Mar 2009, 03:14 PM
Thanks Albert, that does what I need.
CMD
CMD
0
Paul
Top achievements
Rank 1
answered on 18 Mar 2009, 07:04 PM
Hi,
Where abouts in the default.master do you put the 'PublishingNavigation:PortalSiteMapDataSource' tag as if i put it before the radtabstip I get the following error:
Unknown server tag 'PublishingNavigation:PortalSiteMapDataSource'.
I have only started putting the controls into sharepoint and think they add so much to the UI
Many Thanks
Where abouts in the default.master do you put the 'PublishingNavigation:PortalSiteMapDataSource' tag as if i put it before the radtabstip I get the following error:
Unknown server tag 'PublishingNavigation:PortalSiteMapDataSource'.
I have only started putting the controls into sharepoint and think they add so much to the UI
Many Thanks
0
Chris Duden
Top achievements
Rank 1
answered on 18 Mar 2009, 07:27 PM
The entire masterpage is at the bottom of this post:
http://www.telerik.com/community/forums/aspnet-ajax/splitter/moss-and-radsplitter-invalid-json.aspx
You need to add a registration at the top of the page.
CMD
http://www.telerik.com/community/forums/aspnet-ajax/splitter/moss-and-radsplitter-invalid-json.aspx
You need to add a registration at the top of the page.
CMD
0
Paul
Top achievements
Rank 1
answered on 18 Mar 2009, 07:57 PM
That worked a treat.
While im on the subject is there a way of persisting the expanded tab after postback for example
Parent 1 Parent 2
|
|
Child 1 Child 2
if i select child 2 (decendant of parent 1) when the new pages loads is there a way of keeping the parent 1 tab expanded (highlighting what i just clicked). Do i need to write some funky javascript to do this?
Thanks
While im on the subject is there a way of persisting the expanded tab after postback for example
Parent 1 Parent 2
|
|
Child 1 Child 2
if i select child 2 (decendant of parent 1) when the new pages loads is there a way of keeping the parent 1 tab expanded (highlighting what i just clicked). Do i need to write some funky javascript to do this?
Thanks
0
Hi Paul,
RadTabStrip should do this by itself if bound to a sitemap provider which correctly implements the CurrentNode property. In this example RadTabStrip is bound to the PortalSiteMapDataSource controls and correctly retains the current tab.
Best wishes,
Albert
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
RadTabStrip should do this by itself if bound to a sitemap provider which correctly implements the CurrentNode property. In this example RadTabStrip is bound to the PortalSiteMapDataSource controls and correctly retains the current tab.
Best wishes,
Albert
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Paul
Top achievements
Rank 1
answered on 19 Mar 2009, 09:58 AM
This is what I thought but i hve the following data source and it is not binding to the current
<PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server"
SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true"
StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false"
TrimNonCurrentTypes="Heading" />
<PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server"
SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true"
StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false"
TrimNonCurrentTypes="Heading" />
0
Hello Paul,
This is the declaration of the tabstrip and the datasource which we have used in our example:
<telerik:RadTabStrip runat="server" ID="RadTabStrip1" DataSourceID="siteMapDataSource1" Skin="Web20"/>
<PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server"
SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true"
StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false"
TreatStartingNodeAsCurrent="true" TrimNonCurrentTypes="Heading"/>
Regards,
Albert
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
This is the declaration of the tabstrip and the datasource which we have used in our example:
<telerik:RadTabStrip runat="server" ID="RadTabStrip1" DataSourceID="siteMapDataSource1" Skin="Web20"/>
<PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server"
SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true"
StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false"
TreatStartingNodeAsCurrent="true" TrimNonCurrentTypes="Heading"/>
Regards,
Albert
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Chris Duden
Top achievements
Rank 1
answered on 19 Mar 2009, 03:15 PM
Albert is obviously more qualified to help you with this. I will just agree that it does behave for me as Albert describes. One thing I might suggest is to play around with the MOSS settings for the site navigation behavior, it affects how everthing works.
Nobody has followed up on the other issue (link is in this thread), I'm not sure what that means. Should I have posted it in a different area?
Goodluck Paul and thanks for your help Albert.
Nobody has followed up on the other issue (link is in this thread), I'm not sure what that means. Should I have posted it in a different area?
Goodluck Paul and thanks for your help Albert.
0
Paul
Top achievements
Rank 1
answered on 19 Mar 2009, 03:34 PM
Yes I should have started another thread I didnt mean to hyjack just got a bit carried away.
The odd thing is it does persist the selected tab if that tab links to a site it doesnt if the table links to a document library to get .aspx page for example a webpart page
The odd thing is it does persist the selected tab if that tab links to a site it doesnt if the table links to a document library to get .aspx page for example a webpart page
0
Chris Duden
Top achievements
Rank 1
answered on 19 Mar 2009, 03:42 PM
I just tested it. You are absolutely correct. If you create a link to any page within the site using the MOSS tool for managing the navigation, those links do not work correctly.
I'm not really sure you hijacked the thread. Your issue is related: how to get the tabstrip to work correctly with the MOSS navigation datasources.
Goodluck and I will continue reading Albert's responses since now that I know about this issue it is an issue for me too. I just hadn't built out the navigation for the site yet. In another week or so I would have been posting your question.
CMD
I'm not really sure you hijacked the thread. Your issue is related: how to get the tabstrip to work correctly with the MOSS navigation datasources.
Goodluck and I will continue reading Albert's responses since now that I know about this issue it is an issue for me too. I just hadn't built out the navigation for the site yet. In another week or so I would have been posting your question.
CMD
0
Hi,
RadTabStrip relies on the underlying sitemap provider to determine the current page via the CurrentNode property. If the SiteMap provider does not properly update the current node for those particular pages you can implement programatic highlighting as described in this example. The problem here is that server-code is disabled by default for sharepoint master pages. Fortunately there is a workaround explained in this msdn help article. In a word you need the following code (or something similar) to find the tab which corresponds to the current url and select it:
Albert
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
RadTabStrip relies on the underlying sitemap provider to determine the current page via the CurrentNode property. If the SiteMap provider does not properly update the current node for those particular pages you can implement programatic highlighting as described in this example. The problem here is that server-code is disabled by default for sharepoint master pages. Fortunately there is a workaround explained in this msdn help article. In a word you need the following code (or something similar) to find the tab which corresponds to the current url and select it:
RadTabStrip1.
DataBind(); RadTab tab = RadTabStrip1.FindTabByUrl(Request.Url.PathAndQuery);
if (tab != null)
{
tab.SelectParents();
tab.PageView.Selected = true;
}
That code should be executed after the tabstrip has been databound. You can force that by calling its DataBind method first.
I hope this helps,Albert
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Chris Duden
Top achievements
Rank 1
answered on 19 Mar 2009, 06:21 PM
Intersting. I have a deadline on another piece for this week but if you get this working Paul I would appreciate it if you posted your solution.
CMD
CMD
0
Paul
Top achievements
Rank 1
answered on 19 Mar 2009, 06:31 PM
I will do
I just tried enabling code on my master page and it caused a few compolation errors so I will need to resolve these. I will have a go tomorrow and if it doesnt work I will not be able to have another look till the following friday. But want to get this working so will post my solution
I just tried enabling code on my master page and it caused a few compolation errors so I will need to resolve these. I will have a go tomorrow and if it doesnt work I will not be able to have another look till the following friday. But want to get this working so will post my solution
0
Paul
Top achievements
Rank 1
answered on 25 Mar 2009, 05:02 PM
I got it working perfectly I did the following
added this code to the master page
and the following to the web.config to allow the code to run
Thanks for your help
added this code to the master page
<script runat="server"> |
protected void Page_Load(object sender, EventArgs e) |
{ |
RadTabStrip1.DataBind(); |
RadTab tab = RadTabStrip1.FindTabByUrl(Request.Url.PathAndQuery); |
if (tab != null) |
{ |
tab.Selected = true; |
tab.SelectParents(); |
} |
} |
</script> |
and the following to the web.config to allow the code to run
<PageParserPaths> |
<PageParserPath VirtualPath="/BI/_catalogs/masterpage/*" CompilationMode="Always" AllowServerSideScript="true" /> |