We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36604
    • 268 Posts
    Hi,

    Sorry if this obvious, but I can't figure out how to manage with migx to filter out an image list (slideshow) got with getimagelist snippet.

    I added a tv (check box *diapo_active ) to my migx to activate/deactivated each slide, but don't see how to use it actually..
    I found &where parameter sounds good but not luck...All images are always fired.
    Thank you for any ideas.


    [
    {"caption":"Texte", "fields": [
        {"field":"title_diapo","caption":"Titre H4"},
        {"field":"text_diapo","caption":"Légende Diapo","inputTV":"diapo_caption"}
     
    ]},
    {"caption":"Diapo", "fields":[
        {"field":"la_diapo","caption":"Diapo","inputTV":"img_diapo"},
        {"field":"alt_diapo","caption":"Alt Diapo","inputTV":"diapo_alt"},
        {"field":"act_diapo","caption":"Diapo active","inputTV":"diapo_active"}
    ]}
    ]
    


    Grid:
    [
    {"header": "Titre", "width": "100", "sortable": "true", "dataIndex": "title_diapo"},
    {"header": "Caption", "width": "350", "sortable": "false", "dataIndex": "text_diapo"},
    {"header": "Image", "width": "280", "sortable": "false", "dataIndex": "la_diapo","renderer": "this.renderImage"},
    {"header": "Alt image", "width": "100", "sortable": "false", "dataIndex": "alt_diapo"},
    {"header": "Active", "width": "200", "sortable": "false", "dataIndex": "act_diapo"}
    ]


    and the call:
    <div class="container">			       
      <!-- Carousel items -->   
      <ul class="bxslider"> 
    	[[!getImageList?
        &tvname=`DiaposBxSlider`
        &tpl=`Diapos-migx.innerTpl`
    	&tplFirst=`Diapos-migx.innerTpl1st`
    	&where={"diapo_active:=":"1"}]]
      
      </ul>    
    </div>
      • 4172
      • 5,888 Posts
      did you try

      &where=`{"diapo_active:=":"1"}`
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 36604
        • 268 Posts
        ah..ok Forgot the backtiks...Thank you


        but once this stupid typo corrected, there's no more any slider now....
        What should be the value of a checkbbox tv ..isn't it 1 ou 0 ??
        The issue is probably around the way modx render its value, or may be the syntaxe is no correct ??


          • 4172
          • 5,888 Posts
          what do you get with

          [[*DiaposBxSlider]]


          let me see..
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 36604
            • 268 Posts
            Quote from: Bruno17 at Feb 04, 2015, 01:51 PM
            what do you get with

            [[*DiaposBxSlider]]


            let me see..
            hmm this is the migx tv it does not show anything if put into a content.

            This slider has been running for 2 years now.

            I just tried to ease its management adding more control over wich image should be shown or not.

            I add the *diapo_active into one of the tpl used with getimagelist and it returns the string "checked" (normal state).
            So now we know this checkbox return this text (or am I wrong ?)
            so I added
            &where=`{"property.diapo_active:=":"checked"}`
            in the call. (or without the property. prefix too.)
            then the slideshow disapeared, meaning this criter is still wrong.

            I changed the output type of diapo_active to string and text too, ('checked' is rendered if I add the tv in my tpl) but the &where still makes the slider to disapear in this case.


            I change the tv name diapo_active to its migx field name act_diapo in the tpl and the &where, that is the actual placeholder to use...but no luck neither it return nothing.



            [ed. note: elz064 last edited this post 11 years, 8 months ago.]