I'm developing a site in 2.2 and it's got real performance issues at the moment. I'm trying to make things more efficient to see if this helps could anyone give me a more efficient way of doing the snippet below which pulls in tv values to be used in a wayfinder call?
[[!If?
&subject=`[[+FlagSelector]]`
&operator=`notempty`
&operand=`1`
&then=`[[+showFlag:eq=`1`:then=` [[+FlagSelector]]corner`]]`
]]
Tried this but doesn't seem to work
$flagselector = $modx->resource->getTVValue('FlagSelector');
$showflag = $modx->resource->getTVValue('showFlag');
if ($flagselector !== '' && $showflag == 1) {
return $flagselector;
} else {
}
[ed. note: cprookie last edited this post 13 years, 5 months ago.]