Creativity Intro - Set class to a single Slide on Image Shoe

Responsive, suitable for any type of business, built for any needs elegant one-page Joomla template.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sat Oct 19, 2013 7:48 pm
Reply with quote
Report this post
Hello,

I'm developing a website using Creativity template and I need to use different classes for each slide on the intro Image show.

Is this possible?

I see that there is the possibility to set a suffix to the entire module but how can I do that for a single slide?

Thanks in advance
Regards
User avatar
Junior Boarder

teitbite
Sat Oct 19, 2013 8:26 pm
Reply with quote
Report this post
Hi

Sorry module do not support that, but You can always access a slide with a css selectors like for example:

Code: Select all
.gkIsWrapper-gk_creativity .figcaption:nth-child(2) {
.......
}
User avatar
Moderator

GK User
Sat Oct 19, 2013 8:37 pm
Reply with quote
Report this post
Thanks for your help... that's exactly what I was thinking to do :-)

I hope to see a css suffix for each slide on the next version of image show!!
User avatar
Junior Boarder

GK User
Sat Oct 19, 2013 8:59 pm
Reply with quote
Report this post
I wnat to apply a style to the <div> that contains the text, so I try with this:

Code: Select all
.gkIsWrapper-gk_creativity .figcaption:nth-child(2) > div {
     ...
}

but the style is not applied, is my selector wrong?
User avatar
Junior Boarder

teitbite
Sun Oct 20, 2013 6:01 pm
Reply with quote
Report this post
Hi

Please show me Your site and tell me which file You have added it to. If it was override.css, than please check in override is enabled in template settings.
User avatar
Moderator

GK User
Sun Oct 20, 2013 10:45 pm
Reply with quote
Report this post
For the moment I have the site on my localhost... I added the css rule in the following file:

mySiteName\modules\mod_image_show_gk4\styles\gk_creativity\style.css

at line 102, just after

Code: Select all
.gkIsWrapper-gk_creativity .figcaption > div { ... }


because I saw that the base rule was taken from that file.
User avatar
Junior Boarder

teitbite
Mon Oct 21, 2013 6:01 pm
Reply with quote
Report this post
Hi

This is not the correct file. Try with override.css

It's really hard to guess without seeing the site, but I hope this selector is correct. If not I have a different idea.

Please edit file: /modules/mod_image_show_gk4/styles/gk_creativity/view.php

Go to line 127:

Code: Select all
            class="gkIsSlide figure"


and replace it with

Code: Select all
            class="gkIsSlide figure gkSlide<?php echo $i; ?>"


this way You will be able to have a different selector for each slide.
User avatar
Moderator

GK User
Mon Oct 21, 2013 6:29 pm
Reply with quote
Report this post
That's great!!!!

I change also line 135 with

Code: Select all
<div class="figcaption caption<?php echo $i; ?>">


as both are inside the same loop. Now I can use different styles also for caption to make it contrast with background image.

Thank you very much
The problem is solved!!
User avatar
Junior Boarder

teitbite
Tue Oct 22, 2013 8:02 pm
Reply with quote
Report this post
Hi

No problem. Glad I could help :)
User avatar
Moderator


cron