Hey,
I've been working on a site with some other people for quite a long while now (http://www.game-trix.com), and we wanted to change the coding and maybe the layout.
Fine with me, but I want to use a template file to contain the html, so that I can easily change the layout in a later stage.
The problem is: I do understand templates, and know how to implement them, but I just can't make a good template file.
First: I've just ported my website to a template file, and all of the tables that are similar have been deleted and replaced by one with {TITLE} in the top row, and {CONTENT} in the lower.
This also applies to menu's and so on.
But The biggest problem is that I have got a standard block (let's call it centertable), but inside that block, there's supposed to be a table with 2, 3 or sometimes even 4 colums. And every colums doesn't only contain text, but also a dropdown/radiobutton etc.
And what about putting an image in that {content} field?
If I do it the easy way, I will STILL have html in the php file, since I have to make an <img src>.
If I have to make a template file for ALL types of tables (a table with just text inside it, a table with text and a table (2 colums, 2nd column is a radiobutton) inside it, a table with text and a table (2 colums, 2nd column is a dropdown) inside it, and so on.
This will be extremely frustating to do, and it would be better to just combine the html and php. I started making a template file, but I'm making blocks for images, for div aligns, for links, etc. And these blocks will have to be placed inside another block. But that would mean that I have to copy all these blocks a million times so to speak.
Can somebody please tell me a good way to set up your template files, especially on pages that have a similar layout, but inside a similar table, there are also dissimilar tables/images etc.
Or maybe tell about a good tutorial on templates (and not those short ones that explain what you can do with it, but a tutorial on making a good template file for a big website with a lot of different tables in it).
I DO NOT want any html code in my php files. So even links and images should be made with a template or maybe with a function (I prefer the first one).
Thanks for reading this long post 🙂