We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

FieldFrame Matrix as Photo Gallery problem

Development and Programming

Deron Sizemore's avatar
Deron Sizemore
1,033 posts
16 years ago
Deron Sizemore's avatar Deron Sizemore

Thanks guys!

It’s very close to working, but still some weirdness going on. The code that Casey suggested didn’t work, but putting “{ }” around the row_count did make it work: {if {row_count} == {segment_3}}.

The only thing that doesn’t seem to want to work is the second image in the row. If you load up the photos main page, it’s fine (showing the most top row image). If you click on the second image (row_count 2) it doesn’t give you the large full size image; only thumbnails. If you click image 3 or 4 however, it works fine. What’s up with that second image?

Here’s what I’ve got now:

<div id="main">
                {exp:weblog:entries weblog="photos" limit="1" disable="member_data|pagination|trackbacks|categories|category_fields" dynamic="off"}
                <div id="largePhoto">
                    {photos}
                    {if {row_count} == {segment_3}}
                    {exp:imgsizer:size src="{photo}" width="366" height="768" alt="{photo_description}"}
                    {photo_description}
                    {/if}
                    {/photos}
                </div>
                {/exp:weblog:entries}
                <div id="thumbPhotos">
                    {exp:weblog:entries weblog="photos" disable="member_data|pagination|trackbacks|categories|category_fields" dynamic="off"}
                    {if count == "1"}
                    <h3>{title}</h3>
                    <ul>
                    {/if}
                        {photos}
                        {if {row_count} != {segment_3}}
                        <li><a href="/photos/image/{row_count}" title="{photo_description} Full Size">{exp:imgsizer:size src="{photo}" width="57" height="57" alt="{photo_description}"}</a></li>
                        {/if}
                        {/photos}
                    {if count == total_results}</ul>{/if}
                    {/exp:weblog:entries}
                </div>
            </div>
       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

Hmm, I’m not sure. Does enabling Template Debugging show you anything useful?

Also, now that I’ve used the interface, I don’t like the idea of “hiding” the thumbnail of the current image. It’s somewhat confusing from a navigational standpoint since the thumbs aren’t just a “previous” and “next” kinda deal (like Flickr). So, what about instead of not displaying the current image, you just don’t make it a link and add a subtle difference in style like a border of some sort.

Just a suggestion on the design of it.

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
16 years ago
Deron Sizemore's avatar Deron Sizemore
Hmm, I’m not sure. Does enabling Template Debugging show you anything useful? Also, now that I’ve used the interface, I don’t like the idea of “hiding” the thumbnail of the current image. It’s somewhat confusing from a navigational standpoint since the thumbs aren’t just a “previous” and “next” kinda deal (like Flickr). So, what about instead of not displaying the current image, you just don’t make it a link and add a subtle difference in style like a border of some sort. Just a suggestion on the design of it.

Good point on not hiding the current image thumb. I was thinking about just showing it anyway so to remove any possible confusion.

I turned on template debugging, but I’m not sure it gives me anything useful. I’ve never understood what I’m even looking for to be honest. I’ll post the debugging results in the next post.

I removed all images and uploaded new ones to rule out any weirdness there but it seems to have gotten worse. The second image uploaded (row count = 2) just doesn’t work at all usually… or it will show an image from another row when clicked. I’ve even deleted the entry and recreated a new one with new images and still image 2 messes up. I had 9 images at one point and the second, seventh and last three images all were messing up. If you clicked the second image it would show you number 7. If you clicked 7 it would show you number 2 and if you clicked image 8, 9 or 10 it would show you the same image for all of them.

I may just need to scrap this set up and go with a light box or something if the client is ok with it. Running short on time. Seems like this should work, but who knows.

I did turn on template debugging but honestly, I’m not sure what I’m looking for? Are errors in red? Or what would I need to look for?

Thanks Erik!

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
16 years ago
Deron Sizemore's avatar Deron Sizemore

OK, the client decided to just go the lightbox route (thankfully).

Unfortunately I’m still having a problem with the FieldFrame Matrix as a gallery. I’m sure I’m just missing some bit of code that’s causing the issue, but I don’t see it.

The live test URL is: http://lesliehunt.ehclients.com/photos

It seems to be throwing the second entries title (h2) into the <li> items? What the…?

Here’s my new code:

<div id="main">
    {exp:weblog:entries weblog="photos" disable="member_data|pagination|trackbacks|categories|category_fields"}
    <h3>{title}</h3>
    {if count == 1}<ul class="thumbs">{/if}
        {photos}
        <li><a href="http://{photo}" title="{photo_description}" class="lightbox">{exp:imgsizer:size src="{photo}" width="90" height="90" alt="{photo_description}"}</a></li>
        {/photos}
    {if count == total_results}</ul>{/if}
    {/exp:weblog:entries}
</div>
       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
16 years ago
Deron Sizemore's avatar Deron Sizemore

Ah gosh, I’m really not thinking the last couple days. 😊 I figured it out. Didn’t need the if count conditionals in there around the ul. Jeesh!

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team
It seems to be throwing the second entries title (h2) into the <li> items? What the…?

I actually don’t see that. It looks like it’s working just fine to me. I didn’t see anything odd in that section of code either.

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
16 years ago
Deron Sizemore's avatar Deron Sizemore

Sorry, I posted a reply to my initial problem about 10 seconds after I posted the first time. 😊

I found the problem. It was those {if count == 1} tags around the ul.

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

Haha nice. So I suppose you could consider your gallery a success and move on to the next bit? 😊

I’ve been having fun with a gallery lately as well. Working with some html/css/js stuff with a little SlideShowPro as well

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
16 years ago
Deron Sizemore's avatar Deron Sizemore

Yeah I’m considering this one a success at this time. If I didn’t need this done asap, I’d spent more time messing with the previous problem, but at this point, I’m not worrying about it anymore. 😊

I’ve never used SlideShowPro, but it looks nice! Is it pretty customizable?

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team
Is it pretty customizable?

That depends on how you want to customize it. I enjoy it a lot. Slideshowpro.net has some pretty good examples of its use.

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
16 years ago
Deron Sizemore's avatar Deron Sizemore
Is it pretty customizable?
That depends on how you want to customize it. I enjoy it a lot. Slideshowpro.net has some pretty good examples of its use.

Yeah that’s pretty sweet! May have to check into something like that for my own site in the future. Send me the link of your finished product when you get it done. Would love to check it out.

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team
Send me the link of your finished product when you get it done. Would love to check it out.

Cool. Will do. I’m actually about to work on it more now, so I might let you know soon 😊

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.