I have this website wich uses a ditto call like this
[[Ditto? &parents=`898` &tpl=`story_summary`]]
story_summary looks like this
[+type:is=`reference`:then=`{{document_template}}`:else=`{{reference_template}}`+]
I also use PHX for conditional chunks inside story_summary
{{{document_template}} looks like this
<div class=’photo’ style=’width: 100%;padding:0’>
<div id=’photo_container’>
[[MaxiGallerySolo? &galIDs=`[+id+]` pics_to_show=`1` &type=`random` &open=`gallery_overview`]]
<!-- <img src=’assets/galleries/84/204_hotel-regente.jpg’ alt=’[+menutitle+]’ width=’194’ height=’111’ class=’main’><img class=’minor’ src=’assets/templates/klasstour/images/frame.gif’ alt=’[+menutitle+]’>-->
</div>
<div style=’padding-left: 15px;float:left;width:460px ’>
<h3><a href=’[~[+id+]~]’ title=’[+menutitle+]’>[+menutitle+]</a></h3>
<p>[+description+]</p>
</div>
<div style=’float: left;padding-left: 15px;’>
<a class=’btn-detalii’ href=’[~[+id+]~]’ title=’[+menutitle+]’>Detalii oferta</a>
</div>
<div style=’float: right’>
de la <span><b> [+introtext+]</b></span>
</div>
</div>
<div style=’clear: both; padding: 10px;’></div>
and {{reference_template}} looks like this
<div class=’photo’ style=’width: 100%;padding:0’>
<div id=’photo_container’>
<img src=’assets/galleries/84/204_hotel-regente.jpg’ alt=’[+menutitle+]’ width=’194’ height=’111’ class=’main’><img class=’minor’ src=’assets/templates/klasstour/images/frame.gif’ alt=’[+menutitle+]’>
</div>
<div style=’padding-left: 15px;float:left;width:460px ’>
<h3><a href=’[~[+id+]~]’ title=’[+menutitle+]’>[+menutitle+]</a></h3>
<p>[+description+]</p>
</div>
<div style=’float: left;padding-left: 15px;’>
<a class=’btn-detalii’ href=’[~[+id+]~]’ title=’[+menutitle+]’>Detalii oferta</a>
</div>
<div style=’float: right’>
de la <span><b> [+introtext+]</b></span>
</div>
</div>
<div style=’clear: both; padding: 10px; ’></div>
The problem is that any placeholder inside those chunks won’t work, except the [~[+id+]~]
or how can i make conditional chunks inside a ditto call like this : " [[Ditto? &parents=`898` &tpl=`story_summary`]]"
to show me something if page is reference or something if page is document
Any help would be apreciated
I resolved it this way:
I edited MaxiGallerySolo and
put the condition if $pic[’gal_id’] was not set... just show static image.
If $pic[’gal_id’] was not set that ment no gallery was set for current document, wich ment it was reference
So, for every reference type document, i am am showing a static image in my sumary_story chunk.