Fading full screen slideshow
Permalink Browser Info Environment
Hi Chris - we have a kitchen client who would like to show more than one image in the large Jumbotron area on the home page. I was hoping that there might be a way of putting a basic fading in/out slideshow like the default one in C5. Would this be possible do you think?
Type: | Discussion |
---|---|
Status: | In Progress |
Yeah, you should be able to put one there. You'll want a responsive slider though.
Hi Chris - where would you put this block in the coding - I need it to go full screen width?
To the "Feature" area
Sorry Chris is that right the feature area block isn't full width - it looks like it needs to go into the jumbotron. Is that right?
Oh, yeah. You might need to modify the theme's feature.php file (theme_treviso/themes/treviso/elements/feature.php) to this:
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?> <?php if ($c->getCollectionTypeHandle() == 'home') { ?> <div id="feature" class="jumbotron"<?php if ($c->getAttribute('header_image')) { ?> style="background-image:url(<?php echo $c->getAttribute('header_image')->getVersion()->getRelativePath();?>);"<?php } ?>> <div class="overlay"></div> <?php $a = new Area('Feature'); $a->display($c); ?> <a href="javascript:void(0);" class="scrolldown"><span class="glyphicon glyphicon-chevron-down"></span></a> </div><!-- #feature ends --> <?php } else {?> <div id="feature" class="jumbotron"<?php if ($c->getAttribute('header_image')) { ?> style="background-image:url(<?php echo $c->getAttribute('header_image')->getVersion()->getRelativePath();?>);"<?php } ?>> <div class="overlay"></div> <div class="container"> <div class="row">
Viewing 15 lines of 29 lines. View entire code block.
Perfect - thanks Chris that worked...
Great! You're welcome!
Hi Chris,
I want to implement this too but not having much luck. Could you please highlight in the above code, where the slider block code needs to go. I've been putting it here:
Thanks
Nigel
I want to implement this too but not having much luck. Could you please highlight in the above code, where the slider block code needs to go. I've been putting it here:
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?> <------><?php if ($c->getCollectionTypeHandle() == 'home') { ?> <div id="feature" class="jumbotron"<?php if ($c->getAttribute('header_image')) { ?> style="background-image:url(<?php <--><div class="overlay"></div> <div class="container"> <div class="row"> <div class="col-md-12"> <?php.. $bt_ns = BlockType::getByHandle('nivo_slider'); $bt_ns->controller->fsID = test; // ID of your fileset $bt_ns->controller->effect = 'random'; // $bt_ns->controller->slices = 10; $bt_ns->controller->animSpeed = 500; $bt_ns->controller->pauseTime = 3000; $bt_ns->controller->startSlide = 0;.
Viewing 15 lines of 18 lines. View entire code block.
Thanks
Nigel
Just replace feature.php with the above code. Then just add your slider block to the Feature Area. No need to hardcode it.
Thanks, I found my problem was that i have made a custom home.php but with a different name so the 'if' statement wasn't calling the Feature area.
Now that is working I have another glitch...clicking on the 'down chevron' glyph, the scrolling doesn't work. If I use dev tools I can see a js error " Uncaught TypeError: Cannot read property 'top' of null" any pointers to what might cause that?
Thanks Again
Nigel
Now that is working I have another glitch...clicking on the 'down chevron' glyph, the scrolling doesn't work. If I use dev tools I can see a js error " Uncaught TypeError: Cannot read property 'top' of null" any pointers to what might cause that?
Thanks Again
Nigel
Ok..I solved it! I didn't have the 'Callout' area in my new home.php. Putting it in fixed the error.
Glad you got it sorted out.
Hi Chris,
I want to use a slider (e.g. revolution slider) in the head area. How is this possible?
(unfortunately I`m not a developer).
G.
I want to use a slider (e.g. revolution slider) in the head area. How is this possible?
(unfortunately I`m not a developer).
G.
The only way this is possible is with the above code/instructions.