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

Specify visibility on MvcSiteMapNode attribute? #113

Closed
waynebrantley opened this issue Dec 8, 2012 · 5 comments
Closed

Specify visibility on MvcSiteMapNode attribute? #113

waynebrantley opened this issue Dec 8, 2012 · 5 comments

Comments

@waynebrantley
Copy link

There seems to be no way to specify visibility or any other custom attribute on the [MvcSiteMapNode] attribute you declare in code.

I have a custom VisiblityProvider, but there is no way to get it parameters when declaring nodes in code. So I had to create a visibility provider for each possible parameter and then assign that to the MvcSiteMapNode attribute. Figured there was a better way?

Here is same question on SO: http://stackoverflow.com/questions/12790532/how-do-i-specify-an-mvc-sitemaps-visibility-attribute-using-code-based-attribute

@farrukhsubhani
Copy link

I am using the latest build and using default visibility provider. I have provided visibility attribute at one node which i only want to appear in breadcrumbs and not in menu. The sitemapPathhelper is specified in visibility parameter with !* next to it from left to right. It seems to not even consider that in default provider.
Do i need to create visibility provider for this node separately and assign it in code to make this work or does the default visibility provider checks for sietmappath and respects !* to not show it in other menus.
The Question on SO: http://stackoverflow.com/questions/13783466/using-visibility-default-attribute-in-mvcsitemap-to-show-nodes-only-in-breadcr

@waynebrantley
Copy link
Author

My question above is when creating nodes in code only. If using XML this is not an issue. In any case you have to setup the visiblity provider to use the provided 'FilteredSiteMapNodeVisiblityProvider' to get the functionality you are referencing above (not the DefaultSiteMapNodeVisibilityProvider - which does nothing..as you noted)

@waynebrantley
Copy link
Author

BTW, I answered your SO post too. ;-)

@NightOwl888
Copy link
Collaborator

@waynebrantley

I have fixed this issue some time ago in v4, but we only got the Nuget packaging online recently. I would appreciate if you could verify the fix so we can close this issue.

@farrukhsubhani
Copy link

Thanks, i cant upgrade to this as application has gone in production. will
try new package on a new project soon.
Regards
Farrukh

On Fri, Jul 5, 2013 at 7:49 PM, NightOwl888 [email protected]:

@waynebrantley https://github.com/waynebrantley

I have fixed this issue some time ago in v4, but we only got the Nuget
packaging onlinehttps://nuget.org/packages?q=mvcsitemapprovider&sortOrder=relevance&page=1&prerelease=Truerecently. I would appreciate if you could verify the fix so we can close
this issue.


Reply to this email directly or view it on GitHubhttps://github.com//issues/113#issuecomment-20533624
.

_Email: *_farrukh@softwarestudio.co.uk
*Phone
: 0161 9151 065 (call before fax)
Visit: 7 Avon Road, Burnage, Manchester, M19 1HP.
Open weekdays (8am-10pm) weekends (11am-5pm)

This email is confidential, may be legally privileged or otherwise
protected from disclosure, and is sent for the attention of the intended
recipient. If you are not the intended recipient of this email; please
contact the sender and delete it from your system; you must not copy,
reproduce, disclose to any other person, or otherwise use the contents of
it or any attachment. Copyright in documents created by or on behalf of
Subhani Brothers Ltd remains vested in Subhani Brothers Ltd.

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

No branches or pull requests

3 participants