More in this section

Forums / Developing with Sitefinity / Site threeview - select specific start node

Site threeview - select specific start node

10 posts, 0 answered
  1. Ruben Herrera
    Ruben Herrera avatar
    38 posts
    Registered:
    10 Jul 2009
    24 Aug 2009
    Link to this post
    Hi, I want to add Site Threeview - Navigation Control to my template and add a specific start node but I can´t.

    I only can select father, child or current node. If we want personalize menu with a specific starting node of a group pages, what can I do?

    The idea is have a static menu of the sitemap data source.

    Example Menu, where A,B,C is in the same level:

    A
    B
    -b1
    -b2
    C

    Desired menu, independently of the current node, father, child or page etc..:
    B
    -b1
    -b2

    Regards!
    Rubén

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    24 Aug 2009
    Link to this post
    Hello Ruben Herrera,

    You can add the following property to SiteTreeView control.

    [WebEditor("Telerik.Cms.Web.UI.UrlEditorWrapper, Telerik.Cms")] 
        [Browsable(true)] 
        [Category("Navigation")] 
        public string StartingNodeUrl 
        { 
            get 
            { 
                return this.SitemapDataSource1.StartingNodeUrl; 
            } 
            set 
            { 
                this.SitemapDataSource1.StartingNodeUrl = value; 
            } 
        } 

    Then select desired page and set ShowStartingNode = "True" through SiteTreeView's control designer. Let us know if there is anything else that we can do for you.

    Sincerely yours,
    Ivan Dimitrov
    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.
  3. Ruben Herrera
    Ruben Herrera avatar
    38 posts
    Registered:
    10 Jul 2009
    25 Aug 2009
    Link to this post
    Hi, thanks I´ll try it.

    I have another question, is there any way to clean html output and dynamic behavoir? We need simple and static menu, css makes hard work later. Where I can find API to do this kind of personalisations?

    <ul> tag works fine for us like this:

    <ul>
    <li> PageB
         <ul>
               <li> page b1 </li>
              ....
         </ul>
    </li>
    </ul>

    Thank you a lot!
    Rubén

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    25 Aug 2009
    Link to this post
    Hi Ruben Herrera,

    Unfortunately it is not possible to change the rendering of the control. There are performance and styling reasons for this. More information at Rendering. You can create a node template or create a custom skin.

    Sincerely yours,
    Ivan Dimitrov
    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.
  5. Ruben Herrera
    Ruben Herrera avatar
    38 posts
    Registered:
    10 Jul 2009
    25 Aug 2009
    Link to this post
    Hi,
    Is posible to do an User Control to access Site Map and do that menu, like a repeater control for example?

    Custom Skin lets a lot of html tags and node template is not our idea.

    Thanks you, regards.
    Rubén
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    25 Aug 2009
    Link to this post
    Hello Ruben Herrera,

    You can access the SiteMap nodes using CmsSiteMapNode class, but using repeater I am not sure that you will be able to get the same appearance as TreeView control has.

    Kind regards,
    Ivan Dimitrov
    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.
  7. Ruben Herrera
    Ruben Herrera avatar
    38 posts
    Registered:
    10 Jul 2009
    26 Aug 2009
    Link to this post
    Hi,  excuse me again.

    What is the best practise or way to do a personalize menu?

    Menu has to be like we are discussing here, only <ul> and <li> tag and we must to be capable to select starting node.

    I think this Sitefintiy Site do that: http://www.axa-assistance.us/en/about.aspx

    Thank you very much.
    Best wishes.
    Rubén
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    26 Aug 2009
    Link to this post
    Hello Ruben Herrera,

    As I see they use RadPanelBar control. There is one way that probably could do the trick - but you should implement ControlAdapter for RadTreeView. Then register your adapter under App_Browsers/BrowserFile.browser

    Best wishes,
    Ivan Dimitrov
    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.
  9. Ruben Herrera
    Ruben Herrera avatar
    38 posts
    Registered:
    10 Jul 2009
    02 Sep 2009
    Link to this post
    Hi, finally we have done a new user control that inherit from System.Web.UI.UserControl and override render control.

    public override void RenderControl(HtmlTextWriter writer){ 
      
     
      ...recursive functions, read node and children of sitemap... 
     

    Output:
    <ul>
          <li>A
               <ul>
                   <li>A.1</li>
               </ul>
         </li>

    </ul>

    Will It be any issue in the future for override render? I don't think because it access data sitemap, do I?

    Regards
    Rubén
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    02 Sep 2009
    Link to this post
    Hello Ruben Herrera,

    Render method can be used for wtiting element that applies styles and attributes. Also HtmlTextWriter is  base class for markup writers in the System.Web.UI namespace so I could not think about any possible issue if the control has been developed correctly.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
10 posts, 0 answered