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

Gallery Categoree

Development and Programming

Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

Bug fix so the Parent Category actually works!

Sorry about that.

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

Added category_description.

       
groovc's avatar
groovc
13 posts
17 years ago
groovc's avatar groovc

A quick question about this…how does one get this plugin to work? I stuck it inside one of my templates and nothing is happening. I’m running EE Personal 1.6.3.

For instance, does it need to be nested inside another EE tag?

Any examples would be greatly appreciated.

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell
A quick question about this…how does one get this plugin to work? I stuck it inside one of my templates and nothing is happening. I’m running EE Personal 1.6.3.

When you say nothing is happening…what does your template look like? How are you using the tag?

For instance, does it need to be nested inside another EE tag?

No.

Any examples would be greatly appreciated.

Let me see if I can remember how it works and send you something.

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

The following code produces http://thedalzells.org/gallery/cat/2008:

<div id="content">
                <h3 class="gallery-breadcrumb">
                    <a href="http://{path=gallery/index}">Gallery Home</a> <b>›</b> {cat_name}
                </h3>
                {sub_cats}
                    <div class="album">
                        {exp:gallery:entries gallery="{gallery_name}" category="{sub_cat_id}" orderby="random" columns="1" rows="1" dynamic="off"}
                            <div class="thumbnail">
                                {if width > height}
                                    <div class="landscape">
                                        <a href="http://{path=gallery/cat}{sub_cat_name}">{exp:imgsizer:size src="{image_url}" auto="{album_size}" alt="{title}"}</a>
                                    </div>
                                {if:else}
                                    <div class="portrait">
                                        <a href="http://{path=gallery/cat}{sub_cat_name}">{exp:imgsizer:size src="{image_url}" auto="{album_size}" alt="{title}"}</a>
                                    </div>
                                {/if}
                            </div> <!-- thumbnail -->
                        {/exp:gallery:entries}
                        <a href="http://{path=gallery/cat}{sub_cat_name}">{sub_cat_name}</a>
                    </div> <!-- album -->
                {/sub_cats}
            </div> <!-- content -->
       
Zlate's avatar
Zlate
75 posts
17 years ago
Zlate's avatar Zlate

Ok this is something which I’m sure is not possible with this plugin, but I guess it can be accomplished somehow.

Instead of showing the {cat_name} I want to show my gallery category folder in the URL - {cat_folder} perhaps 😊

You are asking why? Well instead of showing “http://www.thehotmag.com/gallery/album/C109/Adriana Lima - Italian’s Elle Magazine” I want to see “http://www.thehotmag.com/gallery/album/C109/adriana-lima-italians-elle-magazine” which “adriana-lima-italians-elle-magazine” is my folder name where I keep the images for this particular gallery subcategory.

Is it possible?

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

I see two options: 1) I add that feature 2) you make the category and the folder the same. i.e http://www.thehotmag.com/gallery/album/adriana-lima-italians-elle-magazine

       
Zlate's avatar
Zlate
75 posts
17 years ago
Zlate's avatar Zlate
I see two options: 1) I add that feature 2) you make the category and the folder the same. i.e http://www.thehotmag.com/gallery/album/adriana-lima-italians-elle-magazine

You mean make the category name without spaces and with dashes? No I can’t do that, I also want to show the category name as it is. But thanks anyway.

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

So the folder name is a sub-category?

       
Zlate's avatar
Zlate
75 posts
17 years ago
Zlate's avatar Zlate

Well yes, you can say that. I’ll explain how I structured my gallery:

Adriana Lima - Adriana Lima Bikini Photoshoot (folder name: adriana-lima-bikini-photoshoot) - Adriana Lima Maxim Photoshoot (folder name: adriana-lima-maxim-photoshoot)

So here the celebrity name is gallery category and the gallery subcategories are the specific photoshoots. I use a descriptive folder names just for better organization on my server, so I thought, why not I use it my folder name to show in the url when a specific photoshoot is shown, if that’s possible of course

Hope I explained my idea well, since English is not mu native language 😊

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

Hmmmm….so you want the category then the cat_folder in the URL and the plugin to parse that and display the correct photos?

Let me think about that and I will get back to you.

Thanks

       
Sacha's avatar
Sacha
33 posts
17 years ago
Sacha's avatar Sacha

Great plugin. I succesfully used it to display the category description on the category page. But for the other feature -using the category name instead of the category id in the url- I’m not sure how to proceed.

Disclaimer: I’m not using the same template structure as you. Instead of http://www.mysite.com/gallery/category/category_name I use http://www.mysite.com/gallery/category_name. I hacked your code to use the second segment instead of the third for the category name, so maybe that’s why some things are not working.

Anyway, taking your site as example, what code would you use on a category page (a single category I mean, like this one) ? Do you still use the “subcats” tag ? (which for some reason in not parsed and just appears as plain text in my template…)

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

I wouldn’t remove that second parameter (‘cat’ in my site) as that is the indication for the which template to use.

       
Sacha's avatar
Sacha
33 posts
17 years ago
Sacha's avatar Sacha

Well, I only have one gallery template anyway. And I like the url better without an additional segment for the categories.

       
44sunsets's avatar
44sunsets
42 posts
about 17 years ago
44sunsets's avatar 44sunsets
I see two options: 1) I add that feature 2) you make the category and the folder the same. i.e http://www.thehotmag.com/gallery/album/adriana-lima-italians-elle-magazine

Thanks for making this plugin, Erin. I’ve got a question though:

Say one of my photo gallery category names is “Only Flora”, and this would normally correspond to a URL like http://www.example.com/gallery/cat/C3/

I’d like to have a URL like this: http://www.example.com/gallery/cat/onlyflora/ or perhaps even: http://www.example.com/gallery/cat/only_flora/

And have EE still be able to parse the shortened “cat_url” (or whatever we should call it) URL. Is this possible with your plugin at the moment? I’ve played with it for about half an hour and can’t seem to get it to work like this,so I’m guessing this feature is not implemented yet?

       
1 2 3

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.