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
Add Module and Namespace in nested module and type pages #314
Add Module and Namespace in nested module and type pages #314
Conversation
- Add Namespace: Option<Namespace> and Module : Option<Module> to TypeInfo record. - Change types to TypeInfo list instead of Type list
- Added link to module if type has module. - Added new test for module links.
…ways a namespace.
This looks like a very useful addition, thanks for doing this! The only thing I would perhaps do a bit differently is to expose the additional information in a way that makes it a bit easier to use in the C# code in the template, so that you do not have to write things like:
Wouldn't the following work instead?
I think this should actually work - if so, could you please simplify the template? (if this doesn't work, then I'm not sure what would be better - I guess we could add |
Yep, while adding the link to the template it didn't feel right doing |
Definitely I prefer the Exists extension method. If you agree I would remove the HasParentModule property. |
Thanks, this is a nice trick :-). |
Add Module and Namespace in nested module and type pages
Adds module and namespace information to the "TypeInfo" and "ModuleInfo" types.
This information is used to add namespace name and links to the parent module in type.cshtml and module.cshtml templates.
Adds test case to review that templates can be generated with correct information.
This will fix #53