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

Forums / Designing & Styling / Can you add tooltips to navigation

Can you add tooltips to navigation

5 posts, 0 answered
  1. Andy
    Andy avatar
    5 posts
    Registered:
    26 Nov 2013
    26 Nov 2013
    Link to this post
    Can you add tooltips to the navigation in any way? It's to help with the site's SEO
  2. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    26 Nov 2013 in reply to Andy
    Link to this post
    Hey Andy,

    If you edit your navigation widget you select a template, click on edit template.
    On the edit template screen, find the <a runat="server"... tag and add a title='<%# Eval ("UrlName") %>' .

    By default however it seems they've locked out the description or html title, so you can only 'tooltip' the menu-name (UrlName) property. 
  3. Haleh
    Haleh avatar
    2 posts
    Registered:
    29 May 2014
    06 Jun 2014
    Link to this post

    I have a vertical nav widget with 4 to 5 links and would like to add a tooltip to each of the links.

    How do I go about doing this?

    <ul class="sfNavVertical sfNavList">
            <navigation:NavigationContainer  runat="server"  DataSourceID="dataSource">
                   <Templates>
                    <navigation:NavigationTemplate>
                             <Template>
                               <li>
                                    <a runat="server" href='<%# Eval("Url") %>' target='<%# NavigationUtilities.GetLinkTarget(Container.DataItem) %>'><%# Eval("Title") %></a>          
                                </li>
                             </Template>
                           <SelectedTemplate>
                                <li>
                                    <a runat="server" href='<%# Eval("Url") %>' class="sfSel" target='<%# NavigationUtilities.GetLinkTarget(Container.DataItem) %>'><%# Eval("Title") %></a>          
                                </li>
                            </SelectedTemplate>
                        </navigation:NavigationTemplate>
                    </Templates>
            </navigation:NavigationContainer>
        </ul>

     

     

     

  4. Haleh
    Haleh avatar
    2 posts
    Registered:
    29 May 2014
    06 Jun 2014 in reply to Jochem Bökkers
    Link to this post
    Hi Jochem,
    Would you know how this works?
    I have a vertical nav widget with 4 to 5 links and would like to add a tooltip to each of the links.
    How do I go about doing this?
    <ul class="sfNavVertical sfNavList">

            <navigation:NavigationContainer  runat="server"  DataSourceID="dataSource">

                   <Templates>

                    <navigation:NavigationTemplate>

                             <Template>

                               <li>

                                    <a runat="server" href='<%#
    Eval("Url") %>' target='<%#
    NavigationUtilities.GetLinkTarget(Container.DataItem) %>'><%#
    Eval("Title") %></a>          

                                </li>

                             </Template>

                           <SelectedTemplate>

                                <li>

                                    <a runat="server" href='<%#
    Eval("Url") %>' class="sfSel" target='<%#
    NavigationUtilities.GetLinkTarget(Container.DataItem) %>'><%#
    Eval("Title") %></a>          

                                </li>

                            </SelectedTemplate>

                        </navigation:NavigationTemplate>

                    </Templates>

            </navigation:NavigationContainer>

        </ul>
     
     
  5. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    09 Jun 2014
    Link to this post
    Hello Haleh,

    I have tested the proposed solution by Jochem and it works fine. Below is the code used:
    <ul class="sfNavVertical sfNavList">
        <navigation:NavigationContainer  runat="server"  DataSourceID="dataSource">
               <Templates>
                <navigation:NavigationTemplate>
                         <Template>
                            <li>
                                <a runat="server" href='<%# NavigationUtilities.ResolveUrl(Container.DataItem) %>' target='<%# NavigationUtilities.GetLinkTarget(Container.DataItem) %>'  title='<%# Eval ("UrlName") %>'><%# Eval("Title") %></a>         
                            </li>
                         </Template>
                       <SelectedTemplate>
                            <li>
                                <a runat="server" href='<%# NavigationUtilities.ResolveUrl(Container.DataItem) %>' class="sfSel" target='<%# NavigationUtilities.GetLinkTarget(Container.DataItem) %>' title='<%# Eval ("UrlName") %>' ><%# Eval("Title") %></a>         
                            </li>
                        </SelectedTemplate>
                    </navigation:NavigationTemplate>
                </Templates>
        </navigation:NavigationContainer>
    </ul>

    I hope this helps.

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
5 posts, 0 answered