We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36549
    • 572 Posts
    Hi,
    I have created an Isotope filtering gallery (http://isotope.metafizzy.co/filtering.html) in the past using Articles but i thought this was a little overkill so i'm wondering if this can be done using MIGX.
    The very basic html format would be:
    <div class="container">
    	<ul class="filter">
    		<li><a class="active" href="#" data-filter="*">View All</a></li>
    		<li><a href="#" data-filter=".category1">Category1</a></li>
    		<li><a href="#" data-filter=".category2">Category2</a></li>
    	</ul>
    </div>
     <div class="masonry">
         <div class="item category1"><img src="myImage.jpg" alt=""></div>
        <div class="item category2"><img src="myImage.jpg" alt=""></div>
        <div class="item category1"><img src="myImage.jpg" alt=""></div>
    </div>
    


    So I thought i could use a parent resource with child resources for each 'Category' and each child resource containing the MIGX call for the Category items.
    I may be going around this the wrong way but i couldn't figure how to use MIGX to get the child resources Category field so i am using pdoResources to get the menutitle for each Category:
    Chunk [[filter-buttons]]: <li><a href="#" data-filter=".[[+menutitle]]">[[+menutitle]]</a></li>
    [[pdoResources? 
    					&parents=`35` 
    					&tpl=`filter-buttons` 
    					&sortby=`menuindex` 
    					&sortdir=`ASC` 
    					&includeTVs=`0` 
    					&depth=`1` 
    ]]

    ...and for the actual image items i was going to use MIGX but do not know how to get the results from all child resources.
    [[getImageList?
    &tvname=`filter-itemsTV`
    &tpl=`filter-itemsTpl`
    &docid=`??` 
    ]]
    <div class="item [[+category]]"><img src="[[+image]]" alt=""></div>
    


    Is this anywhere near in the right direction or do i need to go back to using Articles?

    This question has been answered by Bruno17. See the first response.

    [ed. note: 9thwave last edited this post 11 years, 5 months ago.]
      www.9thwave.co.uk
         WEB | DESIGN | PRINT
    • discuss.answer
      • 4172
      • 5,888 Posts
      to get all of them, you can use another pdoResources - call with the getImageList - call inside the tpl-chunk

      Then, you would use
      &docid=`[[+id]]`
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 36549
        • 572 Posts
        Thanks Bruno, I've got it working.
        Have deleted last issues. [ed. note: 9thwave last edited this post 11 years, 5 months ago.]
          www.9thwave.co.uk
             WEB | DESIGN | PRINT
          • 4172
          • 5,888 Posts
          do you have or had at any time the TV 'filter-image' assigned to any template?

          Or do you have a TV with name 'image'?
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!