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

Forums / 3.x Pre-release forums (retired) / Sitemap method not provided

Sitemap method not provided

4 posts, 0 answered
  1. fregas baratis
    fregas baratis avatar
    185 posts
    Registered:
    14 Nov 2002
    08 Mar 2007
    Link to this post
    First some background:

    I am using your custom provider set to retrieve all pages in the Sitemap, regardless of hidden or visible:

    <add name="AllPages" navigable="false" type="Telerik.Cms.Web.CmsSiteMapProvider"/>

    I'm doing this because i need to programmaticaly access hidden pages so that i can have alternate navigation to them. 

    I am also trying to modify breadcrumbs for some of these pages because the custom module i'm making has its own query string parameters that need to go in the breadcrumbs.  So i'm listening for the Sitemapresolve event as recommended in this msdn article:

    http://msdn2.microsoft.com/en-us/library/ms178425.aspx

            protected override void OnInit(EventArgs e)
            {
                SiteMap.Providers["AllPages"].SiteMapResolve += new SiteMapResolveEventHandler(SiteMap_SiteMapResolve);          
                base.OnInit(e);
            }

            SiteMapNode SiteMap_SiteMapResolve(object sender, SiteMapResolveEventArgs e)
            {
                SiteMap.Providers["AllPages"].CurrentNode.ParentNode.Url = "asdfasdfasdf";
                SiteMap.Providers["AllPages"].CurrentNode.ParentNode.Title = "asdfasdfasdf";
                return  SiteMap.Providers["AllPages"].CurrentNode;
            }

    This throws the exception below because the Title property of the node is not implemented.  Note that i tried to modify both CurrentNode and CurrentNode.ParentNode just to test it out. 

    Specified method is not supported.

    Looking in Reflector, here is the culprit in the CmsSiteMapNode class:


    public override void set_Title(string value)
    {
    throw new NotSupportedException();
    }

    Can i get this fixed ASAP?  This is for a site that is soon to be deployed.  I know you guys have a while to go before your final release but this seems to be just missing code.

    Thanks,
    Craig

  2. Bob
    Bob avatar
    330 posts
    Registered:
    24 Sep 2012
    09 Mar 2007
    Link to this post
    Hello Craig,

    Sorry for the inconvenience. I thought no one would need to set this property. Anyway, this will be fixed in the next release. Unfortunately, the next release will not happen for at least another two weeks as we are in the middle of major refectoring. We need to split some assemblies in order to support medium trust and must finish some other fixes before we can compile new binaries.

    Greetings,
    Bob
    the telerik team
  3. Bob
    Bob avatar
    330 posts
    Registered:
    24 Sep 2012
    09 Mar 2007
    Link to this post
    Hi Craig,


    Actually, there is a workaround you could use.

    SiteMapNode SiteMap_SiteMapResolve(object sender, SiteMapResolveEventArgs e)
    {
        
    SiteMapNode oldNode = e.Provider.CurrentNode;
        
    SiteMapNode newNode = new SiteMapNode(e.Provider, oldNode.Key, "New URL", "New Title");
        
    return newNode;
    }

    All the best,
    Bob
    the telerik team
  4. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    09 Mar 2007
    Link to this post
    Did I just hear the magic words..."Medium Trust". Yipee!
Register for webinar
4 posts, 0 answered