Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of XML attribute inheritance #134

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ArtyomBaranovskiy
Copy link

Hello,

I'm using your Mvc.Sitemap provider library and recently faced the following problem:
I need my custom xml node attributes to be inherited from parent nodes, if there is no value in current node.
I've already implemented the functionality, so please verify it and tell me, if something is wrong (I've refactored the code a bit).

Short commit history:

  1. Implement loading inherited attributes
  • The attribute value is got from current node OR from the closest parent
    node which contains not-null/non-empty value
  • Refactor getting inherited route values to remove several hard-coded
    strings and prevent copy-paste
  1. Add config property to setup custom inherited attributes

Best regards,
Artyom

Artyom Baranovskiy added 2 commits March 12, 2013 09:45
- The attribute value is got from current node OR from the closest parent
  node which contains not-null/non-empty value
- Refactor getting inherited route values to remove several hard-coded
  strings and prevent copy-paste
@NightOwl888
Copy link
Collaborator

@maartenba - I was thinking about adding this to v4, but then I realized this could be done in a multitude of ways. Should inheritance include routes, roles, or the other well known XML attributes as well? Perhaps this is one of those scenarios that is best left for a custom ISiteMapBuilder implementation or maybe just subclassing and overriding some of the properties of the current XmlSiteMapBuilder. Thoughts?

@maartenba
Copy link
Owner

Would say all known attributes

Sent from my Windows Phone


From: NightOwl888mailto:[email protected]
Sent: ‎31/‎03/‎2013 18:31
To: maartenba/MvcSiteMapProvidermailto:[email protected]
Cc: Maarten Balliauwmailto:[email protected]
Subject: Re: [MvcSiteMapProvider] Implementation of XML attribute inheritance (#134)

@maartenba - I was thinking about adding this to v4, but then I realized this could be done in a multitude of ways. Should inheritance include routes, roles, or the other well known XML attributes as well? Perhaps this is one of those scenarios that is best left for a custom ISiteMapBuilder implementation or maybe just subclassing and overriding some of the properties of the current XmlSiteMapBuilder. Thoughts?


Reply to this email directly or view it on GitHub:
#134 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants