Press Ctrl / CMD + C to copy this to your clipboard.
Copied to clipboard
Flag this post as spam?
This post will be reported to the moderators as potential spam to be looked at
Topic author was deleted
Nov 06, 2017 @ 19:22
Layout Dilemma: Can I use "IF" in razor sintax to provide different HTML?
Hello there, I'm wondering how to manage different document type for same page.
I mean, I would like to be able to create different layouts options (so I create different DOCUMENT TYPES) and in my HTML put an IF marker to use the correct layout I planned.
This because I would like to cycle all the children of a section and generate the HTML following the order provided in the content side (where one can have 2 images instead of 3, ecc...).
Topic author was deleted
Layout Dilemma: Can I use "IF" in razor sintax to provide different HTML?
Hello there, I'm wondering how to manage different document type for same page. I mean, I would like to be able to create different layouts options (so I create different DOCUMENT TYPES) and in my HTML put an IF marker to use the correct layout I planned. This because I would like to cycle all the children of a section and generate the HTML following the order provided in the content side (where one can have 2 images instead of 3, ecc...).
Thank you, sorry for my bad english
Hi Alessandro
Yes, you can do like this
Comment author was deleted
oh great, thank you, so I suppose there is also possibility for switch cases and nested loops, right?
Yes, you can do whatever c# you want :)
is working on a reply...