-
Notifications
You must be signed in to change notification settings - Fork 221
Consider adding HTML templates #1898
Comments
Looks like we have a similar issue we're considering: https://github.com/aspnet/Razor/issues/821 |
/cc: @DamianEdwards |
Any plan to implement it? https://weblogs.asp.net/scottgu/asp-net-mvc-3-and-the-helper-syntax-within-razor |
@NTaylorMullen - do we have a doc about the existing support for templates in Razor? I looked at https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor and couldn't find anything about templates. @JeanCollas - We have an existing feature that's somewhat limited. #821 tracks some improvements we want to make, but that won't be part of this release. Example:
More examples from our tests: https://github.com/aspnet/Razor/blob/dev/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml |
We don't have an official doc. However, we do have some ad-hoc conversations that have some great template examples given the APIs that are available today: #281 |
This proposal - Design-Time Directive [Language Feature Proposal] #1747 - might be relevant here. It addresses an approach to templating. |
We periodically close 'discussion' issues that have not been updated in a long period of time. We apologize if this causes any inconvenience. We ask that if you are still encountering an issue, please log a new issue with updated information and we will investigate. |
Would adding custom local HTML templates not be a good option to consider?
Something similar to the following would be an option for the implementation:
Creating a separate file and model for this kind of display is sometimes too much as compared as what it intends to do.
Simplifying this by allowing local templates would be helpful.
Except if I missed it, it is not possible at this time (except by using html strings concat or external sub-pages/components).
The text was updated successfully, but these errors were encountered: