I am using matrix to pull instagram photos using the pic puller plugin. Sometimes, the picture is not available. I am able to skip these by using an if conditional in the pic puller loop. however an empty matrix row is still parsed and shown on the final template. I am not sure how to just show the rows with instagram content.
{exp:channel:entries channel="mychannel" status="open" }
{matrix_field}
{exp:ig_picpuller:media user_id="1" media_id="{media_id}" use_stale_cache="yes"}
{if ig_status == "true"}
{ig_standard_resolution}
{/if}
{/exp:ig_picpuller:media}
{/matrix_field}
{/exp:channel:entries}
I considered using the ig_status tag as a search parameter in matrix, but didn't work.
{exp:channel:entries channel="mychannel" status="open" }
{exp:ig_picpuller:media user_id="1" media_id="{media_id}" use_stale_cache="yes"}
{matrix_field search:{ig_status}="true"}
{ig_standard_resolution}
{/matrix_field}
{/exp:ig_picpuller:media}
{/exp:channel:entries}
Any ideas how i can skip the rows without any pictures from being parsed?
{if ig_status == "true"}
conditional, so nothing will show for that row if there's no photo.media_id
- a text input? When you ay "sometimes the picture is not available", why is that? Badmedia_id
? Timeout on Instagram's end? Or nomedia_id
at all?{if ig_status == "true"}
- even the stuff which might not be related to the photo itself. This way, you're displaying nothing at all for that row when there's no photo. You have the same issue with therow_count
being off of course - but there's no alternative to that really. You can't filter a query by the result of an operation within that query.