From the docs, you can pass a body to a tag like this:
#{hello}Bob#{/hello}
and the body can be used via doBody:
Hello #{doBody /}!
but how can you test whether or not a body was provided?
I want to do something like this in the tag:
#{if hasBody()}
#{doBody /}
#{/if}
#{else}
&{'pages.' + _arg + '.name'}
#{/else}
Any ideas?
If you want to keep your tag in html / tag format then you can use this syntax
Your other option is to use fastTags (see this blog post here) . In there you can essentially do the same thing