X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Random template ? (https://forum.x-cart.com/showthread.php?t=5980)

PhilJ 01-12-2004 02:25 AM

Random template ?
 
Say I have 3 different designs of my head.tpl template...

head1.tpl, head2.tpl, head3.tpl

Does anyone know the code to randomise them in customer/home.tpl so that a different one is displayed each time?

Thanks
PhilJ

funkydunk 01-12-2004 10:38 PM

Hi Phil

I would say that the code for this would be very similar to that used in the random image thread.

Cant remember the post number but a search on random image will bring it up.

PhilJ 01-13-2004 06:41 AM

I used this thread:

http://forum.x-cart.com/viewtopic.php?t=6321

So I added the Smarty random plugin which brings up a random number fine.

Code:

{random min=1 max=3}

so I tried

Code:

{include file="head{random min=1 max=3}.tpl"}

but it gives me an error. What am I doing wrong?


All times are GMT -8. The time now is 01:12 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.