<section id="rotator" style="background-image: url(/images/innerHeader1.jpg);">
<section id="rotator" style="background-image:url([(base_url)]images/innerHeader1.jpg);"> <section id="rotator" style="background-image:url([(site_url)]images/innerHeader1.jpg);">
[[if? &is=`[*files*]:!empty` &then=`<h2>Product Downloads</h2>`]]
[+phx:if=`[*files*]`:ne=``:then=`<h2>Product Downloads</h2>`+]
[[if? &is=`[*files*]:!empty` &then=`<h2>Product Downloads</h2>`]]
[[if? &is=`[*files*]:isempty` &then=`` &else=`<h2>Product Downloads</h2>`]] [[if? &is=`[*files*]:empty` &then=`` &else=`<h2>Product Downloads</h2>`]]
@brandonhim
Please correct me here if I am wrong.
"!empty" or "notempty" or "not_empty" or "isnotempty" => Not Empty - True / False
"isempty" or "empty" => Empty - True / False
So your call:
[[if? &is=`[*files*]:!empty` &then=`<h2>Product Downloads</h2>`]]
Says if the TV is not empty output the H2 code - which isn't what is required
I presume the correct call can be one of the following:
[[if? &is=`[*files*]:isempty` &then=`` &else=`<h2>Product Downloads</h2>`]] [[if? &is=`[*files*]:empty` &then=`` &else=`<h2>Product Downloads</h2>`]]
@brandonhim
My bad - this is one of the reasons I never took to PHP.
The logic behind using your call is the same as using "isempty" or "empty", as the output is the same.
If the TV is empty "do nothing", which means it "has something in it" so output the H2
In short form, if the TV is "not empty" output the H2
So, was a long day and I have an early start, so signing out
[[if? &is=`[*files*]:!empty` &then=`<h2>Product Downloads</h2>`]] [[multiTV? &tvName=`files`]] [[if? &is=`[*files*]:empty` &then=`` &else=`<h2>Product Downloads</h2>`]] [[multiTV? &tvName=`files`]] [[if? &is=`[*files*]:isempty` &then=`` &else=`<h2>Product Downloads</h2>`]] [[multiTV? &tvName=`files`]]
You have two possibilities:
- multiTV has an outer template (&outerTpl): http://jako.github.io/multiTV/snippet.html
- multiTV has two PHx modifier to check for empty/notempty multiTV content: http://jako.github.io/multiTV/extras.html
I prefer the first one in most cases.