Change the style of image slider

Permalink
May you live in peace all team!

I am working on concrete5 I used image slider on different pages. Now I want to change the height and with of slider for example portfolio page. If I changed the css of slider it effected on all pages. Please guide me how I change the css of a page that not effected other pages.

Regards,
Sanodia Ijaz

 
mohamedkhalid replied on at Permalink Reply
$page = Page::getCurrentPage();
$pname = $page->getCollectionName();
if($pname="your-page-name")
{
?> <style>
.your-slider-class{width:200px !important;height:300px !important;}
</style><?php
}
you can try this by changing the styles for the particular page
syedmahtab replied on at Permalink Reply
May you live in peace Muhammad Khalid!

Thanks for your guidelines my issue has been solved.

Regard,

Sanodia Ijaz
mnakalay replied on at Permalink Best Answer Reply
mnakalay
Alternatively, for a more robust solution, you could use templates.

in your application/blocks folder, create a folder labelled image_slider just like the image slider block folder. Inside that folder create another one called templates and inside templates create another folder that you can call anything you want following those rules: all small caps and use underscore _ instead of spaces to something like my_template or custom_size

Then go to the original image slider found in concrete/blocks/image_slider and copy both files view.php and view.css

Paste a copy of each in the folder you created in the first step. So now you have application/blocks/image_slider/templates/your_template_folder/view.php and application/blocks/image_slider/templates/your_template_folder/view.css

From here you can modify the css in your template.

Then go to your page and put it in edit mode, click on your slider and select "design & custom template". From the toolbar that appears, click on the little cog icon and from the popup that appears, under "custom template" you select your template, then click on the blue save button and finally publish your page.
syedmahtab replied on at Permalink Reply
May you live in peace mnakaly!

Thanks for your guidelines my problem has been solved.

Regard,

Sanodia Ijaz