0

I've uploaded images to each row and rearranged them afterwards. Then in my EE code I want to show row_id="1" but it's not taking the rearrangement.

3 Answers 3

1

You can try offset or > in your conditional

{project_photos}
    {if project_photos:count == 1} 
        View Photos
    {/if}
{/project_photos}

(realize this will only show if there is one, and only one, photo, do you mean >= 1?)

{project_photos offset="1" OR > 1} {/project_photos}
0
1

Rearrangement will change the ORDER ID of Grid not ROW ID. If you want to do some code on first row of GRID, You can try something like this:

{grid}
    {if grid:count == 1}
        {!-- My code --}
    {/if}
{/grid}
0
0

Thanks for the reply!

I'm using a Lightbox and want to hide the first image from the the full gallery but it still shows the first photo from the gallery.

{project_photos}
{if project_photos:count == 1}
<a class="button" href="{project_photos:photo:crop}" data-lightbox="roadtrip" data-title="{project_photos:caption}">View Photos</a>
{/if}
{/project_photos}

{project_photos row_id="not 1"}
<a href="{project_photos:photo:crop}" data-lightbox="roadtrip" data-title="{project_photos:caption}"></a>
{/project_photos}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.