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

Expose the Context in HelperContext #34

Open
nwoolls opened this issue Nov 7, 2023 · 0 comments
Open

Expose the Context in HelperContext #34

nwoolls opened this issue Nov 7, 2023 · 0 comments

Comments

@nwoolls
Copy link

nwoolls commented Nov 7, 2023

I'd like to create a tag helper that outputs all of the tag names and values. Something useful to consumers of my project so they can easily see all of the tags (names and values) passed into a template, and then customize the template themselves.

Something like {{tags}} that would output the dictionary in JSON format.

I didn't see any official support for this (I tried e.g. {{#.}}{{.}}{{/.}} without luck) and stumbled on this library which looked promising. However, the HelperContext does not provide access to the Context (which is private) or underlying view data. So I don't seem to be able to do this.

Thoughts? Suggestions? Thanks!

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

1 participant