Views photo gallery/slideshow question - Can you help me figure this one out?

Events happening in the community are now at Drupal community events on www.drupal.org.
bastoubach's picture

Hello Everyone,

Because our last meet-up was on the Views module and advanced techniques, I allow myself to post this here. It is also posted on drupal.org, but I haven't had any responses...

I am having a hard time explaining that in a clear and concise way, so please bear with me and ask any questions you may have to clarify...

I am using CCK, Views2, Lightbox2, imagecache.

I am using the story content type to which I added an image field and some taxonomy fields as well.

I have a gallery (made with Views and lightbox2) displaying images filtered by a taxonomy term (winter 2009 for example). When you go to the gallery page and click on the thumbnail, a lightbox slideshow of the original images starts.

Now, the client wants to be able to upload images only, that would not show up on the front page and not appear in the 'Recent Posts' block, but would be displayed in the galleries.

I was thinking of creating another content type, just for the images and the taxonomy, that would not be published on the front page... And set up my views to display images from the two different content types, with the same taxonomy term. I am able to display them, however, the slideshows don't mix. If I click on a thumbnail from one content type, the slideshow only pulls the pictures from that one content type and vice versa.
I would like the slideshows to display everything in that gallery, even if there is more than one content type...

the URL is http://fieldworkproject.com and you can see a gallery here http://fieldworkproject.com/winter-2009

Any suggestion?

Thanks!

Sebastien.

Comments

promoted to front page

Neil Adair's picture

You can stop "story" being promoted by default at admin/content/node-type/story 'workflow settings' and just manually promote 'story' nodes when desired.

If the gallery is a view you should allow both content types in the view filter.

Thank you Neil but...

bastoubach's picture

Thanks Neil for your help!

I had tried first to uncheck the "published to front page", but the post still shows in the 'recent posts' block. So that does not work.

When it comes to the 2 content types, I have it set up this way right now. But my problem is that the two content types slideshows don't mix.

I set up an example for you to check out.
If you go to the summer 2009 gallery http://fieldworkproject.com/gallery-summer-2009 the first picture, the painting with people kissing is from another content type. It does not show anywhere but in the gallery. BUT, if you click on the thumbnail, it is on its own. If you click on the thumbnail beside it, it starts a slideshow and says picture 1 of 15... This is what I am trying to fix... I would like the kiss to be a part of all the other pictures.

Thanks, Sebastien.

Recent posts

Neil Adair's picture

It's just a view. You can replace it with a view that does what you want.

I see what you mean with the slideshow separating the content types, I'm not sure why that is. I'd have to check the view which creates the gallery. It may be a 'feature' of Lightbox but I've found that module to be solid.

In general I try to avoid additional content types unless absolutely necessary.

Give it a try

ipsitamishra's picture

Hi Sebastien,

I read the conversation between you and NeilAdair. I think instead of choosing 2 content types you should use 1 content type. That will be easier.

I had tried first to uncheck the "published to front page", but the post still shows in the 'recent posts' block. So that does not work.

When you uncheck the "published to front page" for a content type, the future posts of that content types will not be published to front page, but the older posts(in your case, stories) will not be reflected with this change automatically. You have to go to the "admin/content/node" page and choose older nodes and choose the action "Demote from front page". Then those posts will not show up on Front page.

Are you using any default "Recent Posts" block!! I think Tracker module does not provide one !!

Otherwise create a view( with block display) and add the filter that nodes which are not promoted to front page should not be selected. This will restrict all those story nodes which are exclusive to your Gallery. And your slide show will not have the problem that you have mentioned.

Anyway, I will test for the "2 content type in one Slide show" problem that you have stated. Will let you know if I find a solution to that.

Cheers,
Ipsita

~ Ipsita Mishra

Solution to the slide show problem

ipsitamishra's picture

Hi Sebastein,

Here is the solution to your second method, where you are using two content types.

I set up an example for you to check out.
If you go to the summer 2009 gallery http://fieldworkproject.com/gallery-summer-2009 the first picture, the painting with people kissing is from another content type. It does not show anywhere but in the gallery. BUT, if you click on the thumbnail, it is on its own. If you click on the thumbnail beside it, it starts a slideshow and says picture 1 of 15... This is what I am trying to fix... I would like the kiss to be a part of all the other pictures.

As you have mentioned, you created two content types and both these content types have a image field to attach image with them.
Suppose, you have

Content type STORY => 'gallery_image' field
Contant type XYZ => 'new_gallery_image' field

... and you create the view to show images from these 2 content types, then the images don't mix within the slide show. That exactly happening when I tested.

But if you share the same image field between both the content types, then the slide show will mix up all image in one slide show.
That means,
Content type STORY => 'gallery_image' field
Contant type XYZ => 'gallery_image' field

In your new content type, use the existing image field from first content type (in your case , story), instead of creating a new one.

Hope I am able to express my point.

Do let me know if that works for you.

Thanks,
Ipsita

~ Ipsita Mishra

Thanks!

bastoubach's picture

We have actually figured out a simpler way to do that, but what you are suggesting could work if we need to have 2 different content types.
Thanks!

Got it! Thank you so much! :)

bastoubach's picture

Hi Ipsita,

Thank you so much for your help!

I went for the simpler solution, as both you and Neil recommended keeping the content types number as low as possible. It's also much simpler for the user, who only has to deal with one content type, but choose if they want it published to the front page or not.

So, I unchecked the "promoted to front page" in the STORY type. And then I went into my recent posts block view and added a filter "promoted to front page".

This is so simple and it's interesting how our (my) brains work sometimes, just focusing somewhere when it should look somewhere else...

Thanks!

Sebastien.

Options

Neil Adair's picture

Drupal is so flexible that there are almost always a number of ways to achieve a particular task or feature. It's usually a good idea to choose the simplest rather than the first. Minimise the number of module dependencies as well as content types.

Ottawa

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: