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?
[ed. note: 9thwave last edited this post 11 years, 5 months ago.]