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

Forums / Developing with Sitefinity / site menu customized

site menu customized

4 posts, 0 answered
  1. Philip
    Philip avatar
    8 posts
    Registered:
    16 Jun 2008
    05 Aug 2008
    Link to this post
    Hello,

    I am trying to create a special menu.
    This is how my sitemap looks like:

    Home (visible in menu=NO)
    - search
    - sitemap
    - Contact
    main 2
    - sub 1
    - sub 2
    - ...
    main 3
    - ...

    My normal menu shows;
    | main 2 | main 3 |

    What I would like to have is the following: an extra menu that looks like
    HOME | SEARCH | SITEMAP | CONTACT
    I want to include this on the top of my masterpage and leave it visible on al pages.

    Is it possible to make this by using a site menu?
    Do I have to make a custom control?
    Is it possible to just add hyperlinks and link them to a page?
    example= hyperlink [home] | hyperlink [sitemap]
    the hyperlink then gets the name of the page in the current language.

    I hope you can help me with finding a solution.

    Thank you

  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    06 Aug 2008
    Link to this post
    Hello Philip,

    If Home page is not visible in navigation, then the best solution is to build a static menu. To archive this, you should create a user control and wrap the RadMenu control like this:

    .ascx
     <telerik:RadMenu ID="RadMenu1" runat="server"
        <Items> 
            <telerik:RadMenuItem Text="Home" NavigateUrl="~/home.aspx"></telerik:RadMenuItem> 
            <telerik:RadMenuItem Text="Search" NavigateUrl="~/home/search.aspx"></telerik:RadMenuItem> 
            <telerik:RadMenuItem Text="Sitemap" NavigateUrl="~/home/sitemap.aspx"></telerik:RadMenuItem> 
            <telerik:RadMenuItem Text="Contact" NavigateUrl="~/home/contact.aspx"></telerik:RadMenuItem> 
        </Items> 
    </telerik:RadMenu> 

    After that you need to register the new control in the <toolboxControls> section of the project web.config file to display it in the toolbox.

    Do let us know if this helps.

    Regards,
    Pepi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Philip
    Philip avatar
    8 posts
    Registered:
    16 Jun 2008
    27 Aug 2008
    Link to this post
    Thank you for your reply.
    I have tested this, and now I'm closer to the answer.
    But I have a website in more than 1 language.

    So I will probally need a static menu linked to a datasourse so that I can display the menu in the correct language.

    EN:     HOME | SEARCH | SITEMAP | CONTACT
    NL:     HOMEPAGINA | ZOEKEN | SITEMAP | CONTACT

    How can I set this up?
    Thank you
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    28 Aug 2008
    Link to this post
    Hi Philip,

    I read the thread and I assume that you are using a master page with RadMenu control comes with corresponding items - HOME , SEARCH, SITEMAP, CONTACT. As I see you would like to have two localizations for your website EN and NL. So, as a solution you need to create a page  with two versions: EN and NL languages and both of them using your template. In your master.cs you have to use "if loop" as a simple solution.

     if (Request.Url.ToString().Contains("/NL")) 
            { 
                RadMenu1.Items.FindItemByText("Home").Text = "NLversion"
                RadMenu1.Items.FindItemByText("Search").Text = "NLversion"
            } 

    I hope this helps.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered