-
- 7 Posts
[+phx:if=`folder is not empty or folder children are published`:then=`
<div id="current-vacancies">
<h2>Current Vacancies</h2>
<ul>
[!Ditto? &parents=`48` &tpl=`careersTemplate` &extenders=`summary` &trunc=`1` &truncLen=`60` &truncOffset=`90` ` &dateFormat=`%e %B %Y`!]
</ul>
</div><!--/#current-vacancies-->
`+]
-
- 7 Posts
To be more precise, how to create a phx condition saying...
"if a specific folder is empty or folder children are unplished do not display"
-
- 5,888 Posts
perhaps this can do it:
[+phx:if=`[!Ditto? &parents=`48`&noResults=`nochilds`!]`:isnot=`nochilds`:then=`
<div id="current-vacancies">
<h2>Current Vacancies</h2>
<ul>
[!Ditto? &parents=`48` &tpl=`careersTemplate` &extenders=`summary` &trunc=`1` &truncLen=`60` &truncOffset=`90` ` &dateFormat=`%e %B %Y`!]
</ul>
</div><!--/#current-vacancies-->
`+]
-
- 7 Posts
Unfortunately that didn’t work...
-
- 5,888 Posts
did a quick test. because I have not installed phx on my test-site I used it in a ditto-tpl like that and ..... worked.
[+phx:if=`[[Ditto? &parents=`[+id+]` &noResults=`nochilds`]]`:isnot=`nochilds`:then=`[[Ditto? &parents=`[+id+]`]]`:else=`I have no childs`+]
should also work outside of Ditto, if you have phx installed.
-
- 7 Posts
Thanks a lot! The second one is working.
-
- 264 Posts
Thx! Last one is working!:) Was looking for it long:)