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

Sitemap without HttpContext #408

Closed
gaspardle opened this issue Aug 27, 2015 · 2 comments
Closed

Sitemap without HttpContext #408

gaspardle opened this issue Aug 27, 2015 · 2 comments

Comments

@gaspardle
Copy link

Hi,

Is it possible to retrieve the sitemap without having an HttpContext?

@NightOwl888
Copy link
Collaborator

No.

But you can fake it by creating your own instance of HttpContext as shown here. We use that technique for both the AuthorizeAttributeAclModule and the SiteMapNodeUrlResolver.

However, I have never tried to get the entire thing to work with a fake HttpContext. You would also need to have a fake RequestContext as well so all of the route values would be available to match.

@NightOwl888
Copy link
Collaborator

Closing as it appears this issue is resolved. Feel free to reopen if that is not the case.

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

No branches or pull requests

2 participants