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

Forums / Bugs & Issues / SiteMapPath Problem

SiteMapPath Problem

6 posts, 0 answered
  1. Byzza
    Byzza avatar
    89 posts
    Registered:
    09 Jul 2007
    21 Jun 2011
    Link to this post
    I was trying to fix the SiteMapPath control problem I am having, but have come across an even stranger problem.

    First I had this single line of code:
    <asp:SiteMapPath runat="server" id="smp" container="span"  SiteMapProvider="SitefinitySiteMap" homeclass="lnkHome" > </asp:SiteMapPath>


    This looks create, but it is adding "~" to the start of each link, ie it renders:
    <a href="~/subscribe" title="Subscribe">Subscribe</a>


    This is obviously doesn't work, so I decided an easy fix was to just use the nodeTemplate and set the URL myself. But when I try it just completely egnores anything I put in the template.
    <asp:sitemappath runat="server" id="smp" homeclass="lnkHome" sitemapprovider="SitefinitySiteMap">
        <CurrentNodeTemplate>
            TEST 123!!!<asp:HyperLink runat="server" ID="CurrentNodeLink"></asp:HyperLink>
        </CurrentNodeTemplate>
        <NodeTemplate>
            <asp:HyperLink ID="HyperLink2" runat="server" Text='<%# Eval("title") %>' NavigateUrl='<%# Eval("url") %>' /> TEST 567!!!
        </NodeTemplate>
    </asp:sitemappath>

    Nothing changes at all.  the comments TEST 123 or TEST 567 doesn't appear.

    I have this on my master page.

    Any help would be appreciated.
    Thank you
    Byron
  2. Byzza
    Byzza avatar
    89 posts
    Registered:
    09 Jul 2007
    22 Jun 2011
    Link to this post
    Hi,
    Just wondering if anyone has any idea's on this.?
    Thanks
    Byron
  3. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    28 Aug 2017
    23 Jun 2011
    Link to this post
    Hi Byzza,

    I'm sorry to hear you are experiencing issues using SiteMapPath in Sitefinity. By the way, can you, please, clarify what was your initial problem with the app-relative URLs? I have tested a sample user control by pasting your code and then placing the control on one of my templates. Everything seemed to work properly (Page title displayed correctly in SiteMapPath, liks contained complete URL) - please take a look at the sample video I've recorded for you (using 4.1 SP2) and let me know if it differs from the functionality you want to implement. Thanks in advance.

    All the best,
    Boyan Barnev
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  4. Byzza
    Byzza avatar
    89 posts
    Registered:
    09 Jul 2007
    24 Jun 2011
    Link to this post
    Hi Boyan,

    While I was placing it directly on the master page rather than use a control, that was how I was doing it.  I just tried putting it in a control and attaching to the master page, but still no good.

    I am still using SP1, and I'm going to try and install SP2 over the weekend and hopefully that will solve my problems.

    With the inital problem it is rendering it as below, there is an extra "~" in front of every URL.
    <span><a href="~/" class="lnkHome" title="Represents the default frontend page structure.">Home</a>  > <a href="~/investorcentre" title="Investor Centre">Investor Centre</a>  > Board Of Directors </span>


    What i would expect to be produced was
    <span><a href="/" class="lnkHome" title="Represents the default frontend page structure.">Home</a>  > <a href="/investorcentre" title="Investor Centre">Investor Centre</a>  > Board Of Directors </span>


    Regards
    Byron
  5. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    28 Aug 2017
    24 Jun 2011
    Link to this post
    Hi Byzza,

    That's a really interesting behavior, if you can, please upgrade your current project or just create a test project with our latest version of Sitefinity project manager (4.1.1501) and let me know if the issues persist. I've attached a screenshot from my local project using the above mentioned version, and the HTML generated by the SiteMapPath control.

    All the best,
    Boyan Barnev
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  6. Byzza
    Byzza avatar
    89 posts
    Registered:
    09 Jul 2007
    27 Jun 2011
    Link to this post
    ARGGGGGG, Stupid adapter.

    ok, I found the problem.  I had the CSS Friendly Adapter installed to get one of our custom menus working when I first did the migration to Sitefinity.    I don't need it any more so I've removed it from the project all together.

    I had problems early with this adapter when it formated the dropdowns differently and I couldn't log on, so I just removed that section as I still needed the menu then.

    Not sure who else uses this, if anyone any more, but here is the control info:
    http://www.asp.net/cssadapters/
    http://weblogs.asp.net/scottgu/archive/2006/05/02/CSS-Control-Adapter-Toolkit-for-ASP.NET-2.0-.aspx


    Thanks for all your help.
    Might be worth adding this to your KB so others know it causes issues with rendering.

    Regards
    Byron
6 posts, 0 answered