We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8345
    • 147 Posts
    Hello!
    I have problem with using getResorces for displaing a banner in webpage.
    Banner images are stored under Resources where every resource is different image for banner.
    banner_image - is TV for uploading a banner.
    I use this getResources call.
    [[!getResources ? &includeTVs=`1` &processTVs=`1` &tpl=`banner` &resources=`[[*banner]]` &sortby=`RAND()` &limit=`1` &depth=`0` ]]
    &resources=`[[*banner]]` - is TV containing coma separated list of resources to display.
    I don`t use parents=`` selection property because then are shown all banners under parent resource, but needed are only those what are writen in
    "banner" TV.
    This is &tpl=`banner` chunk.
    <div id="banner"><img src="[[+tv.banner_image]]" class="img_add" /></div>

    The problem is that sometimes by random the right picture is shown.
    <div id="banner"><img src="assets/banners/110214_dipritec_banner02.jpg" class="img_add" /></div>

    but sometimes the result is that - <div id="banner"><img src="" class="img_add" /></div>

    Anybody can sugest something how to fix this problem?