Closed weedkiller closed 7 years ago
There's no built-in logic for changing the markup that gets rendered based on a condition, role or otherwise. There's just too many different use cases to make a general one-size-fits-all approach work. For example, what if instead of changing the area to red it should use bold font, or what if red is actually not the color for "bad" or "notice" in a particular culture.
This is actually why I like using code-based markup generation. It makes it easier to introduce other code-based concepts into the markup. For example, you could easily choose between two different colors with a ?:
conditional operator based on any condition you want. You could even write a set of helper extensions that provide this kind of canned conditional toggling for your most common use cases.
Sorry - I know that's kind of ducking the question. For now at least, I'd have to say this kind of thing is out of scope.
I was trying to make it work with generic object overload, in which it could take an additional overload or simply, use the existing version Bootstrap()
vs Bootstrap<SiteThemeBling>
- I felt this was quick an dirty option
for e.g. Html.Bootstrap<SiteThemeBling>().Navbar("FluentBootstrap")
vs. Html.Bootstrap<SiteThemeBlackWhite>().Navbar("FluentBootstrap")
Hi,
[ ] - Is there an option to do role based rendering (not authorized, red area for e.g. vs authorized. [ ] - Also it would be nice if the theming could pickup the theme based on a tennant, for e.g. render the logo's and theme colors on the controls for the tenant in SaaS apps
thanks