0

我使用的getResource這樣的:IDX條件TPL

[[!getResources? &tpl=`coffrets_id` &parents=`1115`]] 

coffrets_id TPL我希望能夠做這樣的事情:

[[+idx:is=`1`:then=`show only first getressrouce result`:else=``]] 
[[+idx:is=`2`:then=`show only second getressrouce result`:else=``]] 
[[+idx:is=`3`:then=`show only third getressrouce result`:else=``]]... 

,但我不知道如何只顯示匹配idx的結果。有沒有解決方法?

回答

1

只需使用Templating Properties

[[!getResources? 
    &tpl=`coffrets_id` 
    &tpl_1=`coffrets_id_1` 
    &tpl_2=`coffrets_id_2` 
    &tpl_3=`coffrets_id_3` 
    &parents=`1115` 
]]