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). Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.