Simple ViewSource Example
This example shows how to display SXML source code as (escaped) HTML.
Smartsite SXML | Copy Code |
---|---|
<se:viewsource> <se:if expression="user.isanonymous()"> <se:then> {html.link(login_page, 'Please log in')} </se:then> <se:else> Welcome, {user.fullname()} </se:else> </se:if> </se:viewsource> |
Example Result | Copy Code |
---|---|
<pre> <se:if expression="user.isanonymous()"> <se:then> {html.link(login_page, 'Please log in')} </se:then> <se:else> Welcome, {user.fullname()} </se:else> </se:if> </pre> |