Custom classes for imags in drupal - css

My basic requirement is to display one picture on a page which on clicking, displays a colorbox slideshow of all the pictures in that content type.
https://www.drupal.org/node/1026112
This is the solution I got for it. To apply display:none css for the rest of the images. For that, I need different classes for the images. I'm unable to figure out how to do so.I got a few solutions such as adding a preprocess_image function but it doesn't seem to work. Can I get some help here?

We did this in past using the "Image sets" option provided with the Lightbox2 Drupal module. We had a client request to show one image and then open a slideshow on the same page of the images associated with that content in the CMS. This module say:
If you have a set of images that you would like to group together in a
lightbox, but only wish for one of these images to be visible on your page, you
can assign the "lightbox_hide_image" class to hide the additional images. For
example:
image #1
image #2
image #3
You can create a custom node template to render the images in the required format.
Hope this will help you!

Related

Direct link to an image inside a gallery

I have to edit a wordpress site right now. One of the task is to give thumbnails a direct link to point the image directly in the gallery instead of the gallery page.
I can change the link in the thumbnails but I cannot find out what is the link which goes inside the gallery directly to a specific image. And of course keep the paging capabilities after that.
Depends on the gallery being used, in most cases you link to the gallery index.

Custom content in fancybox in drupal

I have a page, which should contain kind of gallery, and some data when its clicked. So far i found how to display images in it, but how do i display some content there instead of images?
I have content type news, which i should display in light box
Found easier way to do this. I have used colorbox module with colorbox node module. Easy setup, easy use.

Is it possible to have a large image above the content node in Drupal?

I'm trying to replicate pages like the following using Drupal:
http://www.ams-neve.com/Products/Outboard/1073LB/1073LB.aspx
My problem is that I'd like the image at the top (which changes depending on which page you're on) to be part of the main content node, while the menu on the left is a sidebar region.
I'd like to have a 'product' content type where I can write the main copy, include linked files, etc. plus have a 'header image' which would be what appears at the top of the page.
I have the feeling that it can't be done like this because I'd essentially need bits of the node to be rendered into different blocks. If I theme the node template to wrap a div around the header image I can't figure out a way to have that moved to the top of the page and displace the left sidebar down.
Can anyone tell me if it's possible, or suggest an alternative route.
There are a lot of products so I need it to be a simple method.
The method I used was to create a Views Slideshow Block in Views. It pulled the header_image field from my node by looking at the page it was on. I put this block into the header of my page.
Anyone else looking at this should also check out Display Suite. You can do a lot of cool stuff with that.
if i'm not getting it wrong you are having problems with the default way in which drupal blocks work. Have you tried panels? It's an awesome plugin to work with drupal which let you create pages in a really flexible way.
You could have a custom field for your 'Product' content type that is an image or a text field to a URL for the header image. Just use CSS to place them where you'd like.
Alternatively, check out these links, I think they are what you are looking for.
http://drupal.org/project/headerimage
http://drupal.org/project/sections

custom block with content of node according to content type on index page

I am new to drupal, and want to display content of a specific content type in to a block. For that I am creating custom block.I am using drupal 6.
In this block I want to display rotating banner of image in which image will be clickable and some text will be display on image
Actually I have created content type banner_slideshow. now I want to display records of this content type in a block
any help wil be appriciated
For this I would recommend using Views and the Views Slideshow module. After creating your deisred view, you can use Views Slideshow to display a rotating set of content in a block.
See an example. It will look similar but you can also place the slideshow in a block.
To learn more:
Video about using/theming Views Slideshow
Views Slideshow Documentation
Views Documentation
Laxman is right, it's probably better to use Views.
You can create a module and you might not need to query the database, depends of what type of information you want to retrieve.
You need to specify that content:
Are you using an image module? are you "pasting" images directly into the node's body? (basically where are those images you want...)

Using Image module to create an Image Gallery and view them using lightbox

The new version of the Image module has some components, one of them being image_gallery.module which creates some views and taxonomy for you to use.
Now I want that when the user clicks on an image uploaded into a gallery, it is displayed using lightbox. This was easily done when creating a content-type and setting the view to lightbox.
Now the questions are:
Should I use image_gallery module?
If yes, how can I implement lightbox to it?
Should I use the other way (creating content type and creating views manually)?
Am I doing it completely wrong? :)
Any help is greatly appreciated.
I have found Jeff Eaton's Views Gallery to be a great and simple image gallery solution, and it will display images in Lightbox right out of the box. You need to have the lightbox2 module installed first though...
Here's the module:
http://drupal.org/project/views_gallery
And here's a very informative screencast:
http://www.lullabot.com/articles/photo-galleries-views-attach

Resources