Hello G,
You could create a javascript function that represents a handler of
OnClientLoad event. It will retrieve all the nodes for the RadTreeView, iterate the nodes and expand those with children. The described functionality should be implemented in
~/Sitefinity/Admin/ControlTemplates/Pages/SiteMapPanel.ascx template like this:
| <script language="javascript" type="text/javascript"> |
| function onLoad(sender, eventArgs) |
| { |
| var nodes = sender.get_allNodes(); |
| |
| for (var i=0; i < nodes.length; i++) |
| { |
| if (nodes[i].get_nodes() != null) |
| { |
| nodes[i].expand(); |
| } |
| } |
| } |
| |
| </script> |
| |
| <asp:LinkButton ID="createBtn" CommandName="New" CssClass="CmsButLeft new" runat="server"> |
| <strong class="CmsButRight light"><asp:Literal runat="server" Text="<%$Resources:CreateAPage %>"></asp:Literal></strong> |
| </asp:LinkButton> |
| <h2 id="sitemap"><asp:Literal runat="server" Text="<%$Resources:SiteMap %>"></asp:Literal></h2> |
| <div class="sitemapTree"> |
| <telerik:RadTreeView ID="SiteNavigation" OnClientLoad="onLoad" EnableEmbeddedSkins="false" Skin="SitefinitySiteMap" EnableDragAndDropBetweenNodes="true" runat="server" Width="190"></telerik:RadTreeView></div> |
Do let us know if this helps.
All the best,
Pepi
the Telerik team
Check out
Telerik Trainer, the state of the art learning tool for Telerik products.