Conditional Content

Topics: Visual editor
Mar 7 at 3:50 AM
If I have page content where I want to allow the content editors to conditionally show information based on the value of a function.
How do I give users a means of 'wrapping' content in a conditional?
For example, they may have a section that is only displayed if the user's last name is 'Bloggs', but that section may have nested items, so it's not as simple as a text content property.
Is there a way to embed the page content editor inside a razor function?
Mar 13 at 6:00 PM
Sure - you just add a public property of type XhtmlDocument and this will result in a content editor to be shown to the user when editing your Razor Function.

Here is an example of a Razor function with a XhtmlDocument property (line 14).
Marked as answer by mawtex on 3/13/2017 at 10:00 AM