Hi, I'm very new to smarty. I would like to learn more about smarty engine. I understand how smarty works like assign and display but how can I implememt something that able to switch template? I mean when I upload few different template with different name and CMS will auto detect all fresh uploaded template and allow admin to choose which template to use.

Please guide me and provide some example source code if possible. Thank you very much!

You can just implement a routine that uses glob() to scan the template folder.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.