Cannot get localization to work on custom sitemap

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jonathan.eves@gmail.com

    Cannot get localization to work on custom sitemap

    Hi

    I am having a hard time with localization of the sitemap. I have
    created a custom SiteMapProvider which inherits from
    StaticSiteMapPr ovider. For which everything works fine. The next
    thing i did was to add a unique resource key to each the nodes and add
    these resource keys to my globalisation database. Running a SQL Trace
    shows that the call for the localized resource is never made.

    Here is the code that builds creates my nodes

    m_root = new SiteMapNode(thi s,
    rootNodeInfo.ID .ToString(),
    rootNodeInfo.Ur l,
    rootNodeInfo.Ti tle,
    rootNodeInfo.De scription);
    m_root.Resource Key = "<SomeUniqueIde ntifierInHere>" ;
    m_root.Roles = new string[] { "*" };
    AddNode(m_root, null);

    Is it ok to just set the ResourceKey here or is there something else i
    need to do.

    Also, I tried creating an XML sitemap with resource keys the same and
    this works...my breadcrumb was localized. So does anyone know why my
    reourcekeys not picked up in my custom sitemap provider??

    There seems to be no documentation for building your own localizable
    custom provider. Can anyone point me in the right direction if they
    have seen anything.

    Thanks

    The Big Chod

Working...