We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48272
    • 24 Posts
    It seems to be an easy question but I can not find the answer. I like to check if the result of a bloX or migxloopcollection returns an empty result. I use bloX to fill Tabpages and I like to hide an empty tabpage with output modifiers or something like that. If that is not possible I like to show "No results found" when the query is empty. Can someone give me a hint how to do this? Thanks.
      • 4172
      • 5,888 Posts
      there are several ways.

      with migxLoopCollection you can put the result into a placeholder with

      &toPlaceholder=`myresult`


      then you can use that placeholder

      [[[[+myresult:isnot=``:then=`<div class="mytab">+myresult</div>`:else=`$my_noresult_chunk`]]]]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 8274 ☆ A M B ☆
        • 222 Posts
        I use something like this which is a little cleaner in the template:

        [[+myresult:!empty=`<div class="mytab">+myresult</div>`:default=`$my_noresult_chunk`]]
        


        Sort of a personal preference on which output filters to use.