Editing view css how to select variations?

Permalink Browser Info Environment
Hi,

I'm by no means a web developer so excuse any stupidity. But I've got the gallery working really well on the site, very happy with it. Re-wrote some of the view css so that it fits within the style of the site (well the thumbnails)

Basically I want to use the gallery on another page of the site too and would like that gallery to reference a different style sheet, I want it to look different, is it possible and if so where can I change it?

Thanks so much

Type: Discussion
Status: New
ssemple
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
There are a few ways to do this, depending on how your site's theme is set up. If the second gallery is on a page with a different page type, then I'd change the page type template to add an additional css class to one of the container divs.
If, on the other hand, the galleries are on pages that share the same page type, your best bet is probably to create a custom template for the Gallery:

1) Create a new directory on your server here:
YOURSITE/blocks/deluxe_image_gallery/templates/


2) Copy this file:
YOURSITE/packages/deluxe_image_gallery/blocks/deluxe_image_gallery/view.php

...to that new directory you created, and rename it to something else (I'm just making up the words "alternate style" here, but you can call it whatever you want):
YOURSITE/blocks/deluxe_image_gallery/templates/alternate_style.php


2b) Also copy this file:
YOURSITE/packages/deluxe_image_gallery/blocks/deluxe_image_gallery/view.css

...to here:
YOURSITE/blocks/deluxe_image_gallery/view.css

(this step has nothing to do with what you want to achieve -- it's just to prevent a Concrete5 bug from happening where it looks for that css file in the wrong place)

3) Change the CSS class of the outer div in that file (should be around line #9) from this:
<div class="deluxe_image_gallery_container">

...to something like this:
<div class="deluxe_image_gallery_container_alternate_style">


4) Now put a different style for that ".deluxe_image_gallery_container_alternate_style" (or whatever you called it) in your theme's CSS file.

5) To activate this custom template for the gallery, go to the page with the block on it, go into edit mode, click on the gallery block, and choose "Custom Templates" from the popup menu. Then choose "Alternate Style" (or whatever you called it) from the dropdown menu, and click the "Update" button.

Hope that helps!

-Jordan

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.