Page 1 of 1

Template for "Product of the month" page

Posted: Thu May 03, 2012 10:42 am
by mkuuselo
I am currently building new website for my customer. One of the pages she needs, is a "product of the month" page. The page shows picture of the product and some text.
My problem is: how to select the picture from uploaded pictures, my customer needs to have an as easy way as possible, a drop-down list or something like that.
Help, anybody?

Re: Template for "Product of the month" page

Posted: Thu May 03, 2012 3:30 pm
by Recon
Upload 12 pictures to your server:

image01.jpg
image02.jpg
image03.jpg
image_n.jpg

then but this to your template:

Code: Select all

{assign var='month' value=$smarty.now|date_format:"%m"}

<img src="server_path/uploads/images/image{$month}.jpg"/>
-R