Multiple Fancyboxes + custom templates

Permalink Browser Info Environment
Hello,

I'm tying to have 2 fancyboxes + their own templates (or just 1 without a template) but it seems the second one also gets the same custom template.

Is there a quick fix for this?

Type: Discussion
Status: New
DoorDarius
View Replies: View Best Answer
jordanlev replied on at Permalink Reply
jordanlev
There shouldn't be any problems having two different custom templates for two different blocks on a page. Are you using the scrapbook for these blocks? Are you clicking on the blocks after they're added to the page and choosing "Custom Template" from the popup menu (or did you just override the default template)? Are the blocks from Page Defaults? Did you clear you site cache?

That's all I can think of off the top of my head. If you can provide some more details about your situation I might be able to offer more help.
jordanlev replied on at Permalink Reply
jordanlev
I just realized my response may be a little confusing: the questions I asked are not necessarily solutions you need to try, but rather questions I'm asking you so I can get a better idea of what your specific situation is.
DoorDarius replied on at Permalink Reply
DoorDarius
Yes, one of them is a scrapbook item.

I'm using a custom template (blocks>sortable_fancybox_gallery>templates) I'm styling the one from the scrapbook with these classes:

.sortable_fancybox_gallery_container {
}
.sortable_fancybox_gallery_image {
}
.sortable_fancybox_gallery_image img {
}


Point is they count for every fancybox gallery (for example I altered the image size)
DoorDarius replied on at Permalink Reply
DoorDarius
Oh yeah and cache is cleared of course.
jordanlev replied on at Permalink Best Answer Reply
jordanlev
Well, if all of your customization is in the stylesheet, yes those will interfere with each other (because that's the way CSS works -- if it sees the same class or id more than once, it will ignore the first ones it sees and only use the most recent styles it came across).

What you will need to do is modify the view.php template and change the class names in it, then modify its css file to use those different classes (so one of your custom templates is using the default classes and the other one is using different ones).

Does that make sense?
DoorDarius replied on at Permalink Reply
DoorDarius
Yeah it does. Thanks for the help!

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.