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
[SOLVED] random image on slideshow home page
[SOLVED] random image on slideshow home page
Last edited by giapippo on Fri Sep 13, 2013 8:19 pm, edited 1 time in total.
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: random image on slideshow home page
use Showtime, it has all you need.
Re: random image on slideshow home page
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: random image on slideshow home page
sorry
but in the simplex template i have added only the tag {$teaser|@shuffle} and all work fine
a simple way like this?
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>
but in the simplex template i have added only the tag {$teaser|@shuffle} and all work fine
a simple way like this?


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>
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: random image on slideshow home page
please add [SOLVED] ito the title
Re: random image on slideshow home page
Actually I would avoid thegiapippo wrote:sorry
but in the simplex template i have added only the tag {$teaser|@shuffle} and all work fine
a simple way like this?![]()
![]()
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>
{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!
* 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!
Re: random image on slideshow home page
Thank you for the link. I really need that for responsive slideshow as Showtime simple does not cut it.Rolf wrote:Might help https://www.cmscanbesimple.org/blog/cre ... -or-images