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,

    Here's the trick I can't figure out how do achieve it:

    1/ I have migx tv running ok containing a list of images (logos) + some descriptions and url. I use this basically to display a nice logos list.
    This migx TV is associated to only one page that I use as a common pot to pickup any common content I need from whatever page.

    2/ For one specific page I list its sub-pages to present a list doing a getressource.
    here's a row tpl for this list:
    ....<li class="accordion-group brand-item well" id="accordeon[[+idx]]">
        <div class="accordion-heading">
          <h3> <a class="accordion-toggle " data-toggle="collapse" data-parent="#accordeon-brands" href="#tiroir-[[+idx]]">
          [[+longtitle:default=`[[+pagetitle]]`]] <span class="caret"></span></a></h3>
    
    	[[-getImageList?
            &where=`{"Title":"[[*pagetitle]]"}`
    	&tvname=`BrandsLogos`
            &tpl=`PanelLogosTpl`
            &docid=`[[BabelTranslation? &contextKey=`[[*context_key]]` &resourceId=`27` ]]`
      ]]
         
        </div>
        <div id="tiroir-[[+idx]]" class="accordion-body collapse">
          <div class="accordion-inner">
          [[+content]] 
          </div>
        </div>
      </li>....
    

    What I want is for each of those sub pages got by Getresource, (= for each Getresource row) is to get a corresponding image in the Migx. (the sub-pages pagetitle are eq to the Title of each Migx tv row).

    here's the migx tv grid:
    [
    {"caption":"Infos", "fields": [
        {"field":"title_logo","caption":"Titre"},
        {"field":"alt_logo","caption":"Details Logo","inputTV":"details_logo"},
    {"field":"url_logo","caption":"URL","inputTV":"logo_url"}
    ]},
    {"caption":"Logo", "fields":[
        {"field":"le_logo","caption":"logo","inputTV":"img_logo"}
    ]}
    ]


    Thank you
      • 4172
      • 5,888 Posts
      try

          
          [[getImageList?
              &where=`{"Title":"[[+pagetitle]]"}`
              &tvname=`BrandsLogos`
              &tpl=`PanelLogosTpl`
              &docid=`[[BabelTranslation? &contextKey=`[[*context_key]]` &resourceId=`27` ]]`
          ]]
      
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 36604
        • 268 Posts
        Quote from: Bruno17 at Jun 16, 2013, 09:51 AM
        Thank you,

        I tried this wich is clearer for debuuging purpose.
        Without the where clause I render all the img that exist into the migx, indicating the request is functionnal.
        But the &where is somehow wrong and if present, nothing comes from the migx.

        I also corrected the parameters into the where (previously "Titre" was wrong too because this is the caption, not the actual field name.. but nothing comes out from this request.

        &where=`{"title_logo":"[[+pagetitle]]"}`


            
        	   [[getImageList?
        
                &tvname=`BrandsLogos`
               	&tpl=`@CODE:<div>[[+title_logo]] <img src="[[+le_logo]]" alt="logo [[+title_logo]]" /></div>`
                &docid=`[[BabelTranslation? &contextKey=`[[*context_key]]` &resourceId=`27` ]]`
            ]]
             
        


        the point is how to make some connection between one subpage and one raw of the 'distant' migx tv...
          • 36604
          • 268 Posts
          Ok I have some results but not very consistent:
          This seams to be the correct syntaxe.
          [[getImageList?
          	 &where=`{"title_logo:=":"[[+pagetitle]]"}` 
          
                  &tvname=`BrandsLogos`
                 	&tpl=`@CODE:<span>[[+title_logo]] <img src="[[+le_logo]]" alt="logo [[+title_logo]]" /></span>`
                  &docid=`[[BabelTranslation? &contextKey=`[[*context_key]]` &resourceId=`27` ]]`
              ]]


          However I do not get all the images only for some subpages, meaning the where does not fing any matching sometime , wisch is not possible cause the title are actually written the same as the subpage pagetitle...?

          Now the getressources rendered only the subpage where the getimageList found a matching..??.?? (ok &limit) [ed. note: elz064 last edited this post 13 years, 4 months ago.]