The temoignages.config.inc.php
file
$settings['fields'] = array(
'nom' => array(
'caption' => 'Nom',
'type' => 'text'
),
'quartier' => array(
'caption' => 'Quartier',
'type' => 'dropdown',
'elements' => '@SELECT pagetitle, id FROM [+PREFIX+]site_content WHERE template = 10 ORDER BY menuindex ASC'
),
'date' => array(
'caption' => 'Date',
'type' => 'date'
),
'temoignage' => array(
'caption' => 'Témoignage',
'type' => 'richtext'
),
'photo' => array(
'caption' => 'Photo',
'type' => 'image'
),
'home' => array(
'caption' => 'Afficher sur la page d’accueil',
'type' => 'checkbox',
'elements' => 'Oui==1'
),
'published' => array(
'caption' => 'Publier',
'type' => 'checkbox',
'elements' => 'Oui==1'
)
);
My snippet call:
[!multiTV?
&tvName=`temoignages`
&docid=`6`
&outerTpl=`@CODE: <div class="columns">[+wrapper+]</div>`
&rowTpl=`temoignages.accueil.row`
&display=`5`
&extenders=`@FILE assets/tvs/multitv/dittoExtender/multitvfilter.extender.inc.php`
&multiTvFilterBy=`temoignages`
&multiTvFilterOptions=`[{"name":"home","type":"text","value":"1","mode":"is"}]`
&published=`1`
!]
I don't use Ditto but I thought that filtering works… but it's not.
I want to display only when the field home
is equal to 1. In a simply world, I could use a If
snippet in the temoignages.accueil.row
chunk but this trick works only when you have &display=`all`
Someone have a solution?
Thanks.