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...).
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
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.