Jaguar Posted October 21, 2009 Share Posted October 21, 2009 Here's my site structure (very simplified)... index.php blog/ index.php post.php forum/ index.php post.php Now I want to create a basic template system, but I'm not sure how to store my template files. I can think of a couple ways. One template directory with all the files. The drawback is I might have to get clever with naming the files or the the file names could get long. templates/ header.tpl footer.tpl index.tpl blog_index.tpl blog_post.tpl forum_index.tpl forum_post.tpl Or a template directory in every directory. The drawback is I will have to include files from multiple directories. templates/ header.tpl footer.tpl index.tpl blog/ templates/ index.tpl post.tpl forum/ templates/ index.tpl post.tpl Or multiple directories inside a single template folder. templates/ header.tpl footer.tpl index.tpl blog/ index.tpl post.tpl forum/ index.tpl post.tpl I'm guessing this last solution is the right way, but I like the simplicity of the first method (one directory). Link to comment https://forums.phpfreaks.com/topic/178514-how-do-you-organize-template-files/ Share on other sites More sharing options...
JAY6390 Posted October 21, 2009 Share Posted October 21, 2009 The last solution would be the best solution IMO but there really is no right or wrong solution Link to comment https://forums.phpfreaks.com/topic/178514-how-do-you-organize-template-files/#findComment-941474 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.