+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Where is the SiteMenu control?

Where is the SiteMenu control?

13 posts, 0 answered
  1. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    05 Oct 2010
    Link to this post
    I'm very new to Sitefinity.

    I've created a web site, and am using the Summer theme just to get started.  I edit the SummerHome template, and drag a SiteMenu control into the TopMenu content placeholder, then save the change.

    So, how do I add menu items to it?  If I click the Edit button on the SiteMenu, there is a box labeled "Items", but it is disabled for edit.  I don't see any way to add menu items inside the CMS, and when I open the SummerHome.master page in Visual Studio, there is no SiteMenu or RadMenu control to be found.

    What am I missing here?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    05 Oct 2010
    Link to this post
    Hi Robert,

    The SiteMenu (RadMenu) control is bound the the SiteMapDataSource control. The control is populated from pages which you are creating from the backend and respectively the pages in the menu control will have the same hierarchy.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    07 Oct 2010
    Link to this post
    Thanks, Ivan.  That makes sense.

    Next issue: the menu does not look like it should, according to the sample page images (e.g., Blue.jpg).  In the sample, the menu items look bigger and do not have a border.  But what I really get are small items that have a thin black border.  If I could find the skin or css this uses, I could modify it myself.

    All the docs say that there should be a Radmenu.skin file in the ~/App_Themes/Summer-Blue folder that points to a Menu folder for the skin.  However, this is missing; what I have instead is a Tabtrip.skin file that points to a non-existent "Summer" skin folder, and I have a Tabstrip folder. Examining the styles.css file in the Tabstrip folder, I see nothing that references class names that are actually in the generated source of a web page that uses this theme.  For example, in the ~/App_Themes/Summer-Blue/Tabstrip/styles I have a lot of styles that define the class "RadTabStrip_Summer", but there is nothing in the generated source of a page that uses that class; the menu div actually uses classes "RadMenu RadMenu_Default".

    How do I get the theme to actually use the class styles in Tabstrip/styles.css?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    07 Oct 2010
    Link to this post
    Hi Robert,

    The RadMenu in your case uses its embedded skin - Default. You can style the control as you want following this tutorial . I am sending you a zip with default skins for RadControls for ASP.NET AJAX.


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    07 Oct 2010
    Link to this post
    Thanks, Ivan.

    I'm a bit confused.  That tutorial has me starting from scratch.  I'd need to delete the Sitemenu I added via the CMS and instead add a RadMenu to the template via Visual Studio, where I have to re-create the menu items by hand or by the RadMenu Item Builder.  I would then have to duplicate the menus in the other master pages that have the same SiteMenu, and that starts to complicate maintenance.

    Is there a way to keep my existing SiteMenu and edit the skin in the CMS? That is how our designer will work when she takes over, and she does not have VS.  If not, can I get the RadMenu to use the same SiteMapDataSource control so I don't have to manually add menu items?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    07 Oct 2010
    Link to this post
    Hello Robert,

    SiteMenu is a RadMenu control that is bound to SiteMapDataSource. The control is declared inside Sitefinity/UserControls/Navigation35/SiteMenu.ascx. You have to create your skin following the tutorial and then you can set the skin through UI by using Skin property of the control.


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    07 Oct 2010
    Link to this post
    It fails at step 9 of the tutorial.  It does not see my skin. It doesn't see any skins except the embedded skins.  If I manually change it to "Summer" (the name of my skin) it bombs.  If I try to choose the skin from the drop-down in the RadMenu's properties, only embedded skins show up.

    How do I get it to see my skin?  That is not covered in your tutorial that I can see.
  8. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    07 Oct 2010
    Link to this post
    Okay, I'm getting somewhere.  I created a RadMenu.skin file with Skin="Summer", then manually typed "Summer" into the properties of the RadMenu control, and it seems to be working now.

    Except... how can I get back the behavior it had before, where it was populated by the SiteMapDataSource and pulls from the CMS?
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    08 Oct 2010
    Link to this post
    Hi RSewell,

    Changing the Skin property should not affect the DataSourceID and the control should be still populate from the SiteMapDataSource.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    08 Oct 2010
    Link to this post
    Ivan, let's summarize the conversation so far.  Using the CMS, I added a SiteMenu control to my master page. Behind the scenes, this created a SiteMapDataSource control and linked it to the SiteMenu. However, I could not find a way to use my own CSS on the SiteMenu, or even the skin that came with the Summer Community theme. You sent me a link to a tutorial that had me delete my SiteMenu and use Visual Studio to add a RadMenu control and create my skin that way. That solved the skinning issues, however, there is no longer a SiteMapDataSource control that automatically maps my site's pages, so adding pages via the CMS now requires the additional step of manually adding each page to the menu using VS.

    So you're right, changing the skin has nothing to do with binding to a SiteMapDataSource control, but the problem is that there is no longer a SiteMapDataSource control for the RadMenu to bind to.

    I appreciate your attempts to help, but it seems like you don't read what I write, and your answers do not actually address my problems or even what you recommended before.

    Please, Ivan, I am new to Sitefinity, I need help that goes beyond a few brief sentences and a link, that effectively just tells me to "read the manual." I'm not stupid, but I think this tool may be more complex than I have the time for. I am seriously beginning to regret purchasing Sitefinity.
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    08 Oct 2010
    Link to this post
    Hi RSewell,

    First setting a new SKIN does not require to create a new control. SiteMenu control is a user control inside which there is RadMenu control. The RadMenu control is bound to SiteMapDataSource. I sent you the path the the SiteMenu control - Sitefinity/UserControls/Navigation35/SiteMenu.ascx from where you can see the actual code and declaration. Binding the control to the SiteMap requires just adding SiteMadDataSource (standard ASP.NET control)control is the same place holder where your RadMenu resides.Furthermore I sent you all base skins so you do not have to write anything from scratch.

    What you have to do is just creating a skin file inside your Theme and creating a custom stylesheet with the classes you want to use.
    Since the skin issue has been solved I do not see why you just do not add SiteMapDataSource in your RadMenu control?

    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" />
    <telerik:RadMenu OnClientLoad="ClientLoad" ID="RadMenu1" runat="server" DataSourceID="SitemapDataSource1">
    </telerik:RadMenu>



    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. Gratian
    Gratian avatar
    9 posts
    Registered:
    05 Nov 2010
    15 Dec 2010
    Link to this post
    I have a problem with this control. When i try to set the postback url in radmenu control (exposed by sitemenu) it doesn;t saves it.
    Can anybody tell me why and how i can make this work.
    Thanks.
  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    15 Dec 2010
    Link to this post
    Hi Gratian,

    The default value of PostBackUrl is an empty string which cases the menu to post back to the same page.

    Can you try

    1. Setting PostBackUrl from the control declaration Sitefinity\UserControls\Navigation35\SiteMenu.ascx.cs

    2. Try exposing a public property inside the code behind of the control and use it

    public string PostBackUrl
    {
        get
        {
            return this.RadMenu1.PostBackUrl;
        }
        set
        {
            this.RadMenu1.PostBackUrl = value;
        }
    }




    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
13 posts, 0 answered