[SOLVED] random image on slideshow home page

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
giapippo
Forum Members
Forum Members
Posts: 176
Joined: Tue Feb 28, 2012 1:24 pm

[SOLVED] random image on slideshow home page

Post by giapippo »

hello
I'm adapting a template to cmsms
I would like to randomly load images from a directory on the homepage
the current template is:
----------------------------------------------------------------
<div class="flexslider">
<ul class="slides">
<li> <img src="uploads/images/flexslider/3.jpg" alt=""/></a> </li>
<li> <img src="uploads/images/flexslider/6.jpg" alt="" /> </li>
<li> <img src="uploads/images/flexslider/4.jpg" alt="" /></a>

</li>
</ul>
</div>
------------------------------------------------------------

what i have to do ?

thanks

gianluca
Last edited by giapippo on Fri Sep 13, 2013 8:19 pm, edited 1 time in total.
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: random image on slideshow home page

Post by staartmees »

use Showtime, it has all you need.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: random image on slideshow home page

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
giapippo
Forum Members
Forum Members
Posts: 176
Joined: Tue Feb 28, 2012 1:24 pm

Re: random image on slideshow home page

Post by giapippo »

sorry

but in the simplex template i have added only the tag {$teaser|@shuffle} and all work fine

a simple way like this? ;D ;D

thank

{assign var='teaser' value='uploads/simplex/teaser/*.jpg'|glob}
{capture}{$teaser|@shuffle}{/capture}
{foreach from=$teaser item='one'}
<div><img src='{root_url}/{$one}' width='852' height='200' alt='' /></div>
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: random image on slideshow home page

Post by staartmees »

please add [SOLVED] ito the title
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1968
Joined: Mon Jan 29, 2007 4:47 pm

Re: random image on slideshow home page

Post by Jo Morg »

giapippo wrote:sorry

but in the simplex template i have added only the tag {$teaser|@shuffle} and all work fine

a simple way like this? ;D ;D

thank

{assign var='teaser' value='uploads/simplex/teaser/*.jpg'|glob}
{capture}{$teaser|@shuffle}{/capture}
{foreach from=$teaser item='one'}
<div><img src='{root_url}/{$one}' width='852' height='200' alt='' /></div>
Actually I would avoid the
{capture}{$teaser|@shuffle}{/capture}
block altogether, and replace it by
{shuffle($teaser)}.

Capturing is too slow...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

Re: random image on slideshow home page

Post by luya »

Thank you for the link. I really need that for responsive slideshow as Showtime simple does not cut it.
Post Reply

Return to “Layout and Design (CSS & HTML)”