Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi, how can I use the NOT statement with IF like in PHP? I see the following does work:

Code: Select all
<cms:if not text>
....
</cms:if>


Code: Select all
<cms:if ! text>
....
</cms:if>


And I know this if off topic. Is there a way to disable template engine tags but use PHP directly for the templates instead, without using <cms:php></cms:php>. Instead use direct function calls for variables and values.

Although CouchCMS tags are awesome and has it's place for designers, I find it really cumbersome if it doesn't offer foreach loops, ++$variable, switch(), etc. taking a lot of PHP power away.

Not a great fan of template engines after using smarty, twig, my own template engine, etc. for years.

Thanks!
Code: Select all
<cms:if text>
<cms:else/>
    ...
</cms:if>
or
Code: Select all
<cms:if "<cms:not text/>">
    ...
</cms:if>
cheesypoof wrote:
Code: Select all
<cms:if "<cms:not text/>">
    ...
</cms:if>


That was quick. thanks! This is what I was looking for. But hope NOT and ! will support directly in IF in the future, so it's more natural :)
3 posts Page 1 of 1