hugopeek / romanesco-patterns

0 stars 0 forks source link

Load properties in overviewOuter chunks with property set #66

Closed hugopeek closed 4 years ago

hugopeek commented 7 years ago

I don't know if this is possible, because getResources is already wrapped in either a getCache or getPage call. So I don't know where to put the actual @Romanesco-like reference to a custom property set. But there's so many properties in there right now, and many of them shared, that it's worth finding out. DRY and all..

[[![[If? &subject=`[[+pagination]]` &operator=`EQ` &operand=`1` &then=`getPage@SemanticUI` &else=`getCache`]]?
    &element=`getResources`
    &cacheKey=`overviews`
    [[++custom_cache:eq=`0`:then=`&cacheExpires=`1``]]

    &parents=`[[+parent]]`
    &depth=`[[+depth]]`
    &limit=`[[+limit]]`
    &tpl=`overviewRow[[+[[+prefix]].row_type]]`
    &includeTVs=`1`
    &processTVs=`1`
    &tvPrefix=``
    &showHidden=`[[+show_hidden:default=`0`]]`
    &sortby=`[[+sortby]]`
    &sortdir=`[[+sortby:is=`menuindex`:then=`ASC`:else=`DESC`]]`

    &row_tpl=`[[If? &subject=`[[$[[+row_tpl]]Theme]]` &operator=`isnull` &then=`[[+row_tpl]]` &else=`[[+row_tpl]]Theme`]]`
    &column_type=`[[+[[+prefix]].column_type]]`
    &title_field=`[[+title_field]]`
    &title_hierarchy=`[[+title_hierarchy]]`
    &show_subtitle=`[[+show_subtitle]]`
    &show_introtext=`[[+show_introtext]]`
    &link_text=`[[If? &subject=`[[+link_text]]` &operator=`isnull` &then=`0` &else=`[[+link_text]]`]]`
    &de_emphasize=`[[+de_emphasize]]`
    &icon_type=`[[+icon_type]]`
]]