• Notice regarding image hosts and attachments. See here.

Smarty

Soldato
Joined
8 Oct 2005
Posts
4,184
Location
Midlands, UK
Hi,

I've just been going through a ecommerce book that uses smarty. It uses a custom smarty plugin called 'load presentation object' to autoload a certain method of class files. Basically, you end up with an entire ecommerce store that uses only index.php. I personally found this to be a little overly complicated (when in reality its a big switch statement, including different templates and data.

I've seen a few smarty websites and like normal sites, use multiple files. E.g a product.php files that includes all the smarty stuff, passes product information to a product detail template file and displays it. This method personally makes more sense to me.

Assume the project is an ecommerce store.

Is there an actual correct way to use smarty in real world projects?

Thanks
 
Back
Top Bottom