Hi thanks for the advice guys,
My only contention is that doesn't caching take care of that speed difference?
In my particular usage of these conditional output modifiers--I'm using them as a means of making dynamic Chunks, where I can pass particular values that result in the chunk being displayed differently. For example:
Chunk (named titleChunk)
[[+title
:if=`yes`:then=`<h1 class="title">[[*pagetitle]]</h1>`
:if=`no`:then=`No Title`
:if=`withCrumbs`:then=`<h1 class="title">Category >> Category 1 >> [[*pagetitle]]</h1>`
]]
So I would call this chunk in some template, and customize the output (instead of having to create a variety of chunks just for pagetitle variation)
So for example:
Template (named homePage)
<content>
[[$titleChunk? &title=`no`]]
</content>
and
Template2 (named defaultPage)
<content>
[[$titleChunk? &title=`withCrumbs`]]
</content>
From my understanding, because of the way Modx caches, it would cache those templates right? and therefore, on each page-render, it won't re-evaulate those Conditional out-put modifiers, it is simply using a cached version when ever each template is invoked?
Or am I totally off the mark?
Thanks alot
@BobRay
So you suggest, that I should display it like this,to get it work correctly? (adding the else bit):
[[+title
:if=`yes`:then=`<h1 class="title">[[*pagetitle]]</h1>`:else=``
:if=`no`:then=`No Title`:else=``
:if=`withCrumbs`:then=`<h1 class="title">Category >> Category 1 >> [[*pagetitle]]</h1>`:else=``
]]