Welcome to WebmasterWorld Guest from 184.73.126.70

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

templates

the best way

   
5:23 pm on Jun 8, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was wondering what is the best way in php to create templates?
8:10 pm on Jun 8, 2012 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I really don't think there is a "best" way. There are many though. Use a templating library or roll your own method. this thread [webmasterworld.com] touches on some of them, though it's not specifically about templates. It's been discussed a lot here.
8:16 pm on Jun 8, 2012 (gmt 0)



Smarty templates
9:27 pm on Jun 8, 2012 (gmt 0)

WebmasterWorld Administrator incredibill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Forget templates, think FRAMEWORKS.

What you want is something to start with that's scalable from desktop to cell phone and has scalable styles for images, tables, divs and forms already covered which will save a ton of time.

I'm into Twitter Bootstrap [twitter.github.com] at the moment and there's a bunch of free bootstrap templates available.
1:14 am on Jun 9, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok sure, so what is the best way to set up a framework/template?
I am currently just using include files, which makes things easy to edit the site throughout, but I am very new to this, and don't know anything else.
7:59 am on Aug 12, 2012 (gmt 0)

WebmasterWorld Administrator incredibill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I am currently just using include files, which makes things easy to edit the site throughout


That's pretty much how a framework functions. All the CSS style code and required javascript are in include files. The trick is you don't have to do all the initial grunt work, it's done for you. You just change the color schemes and add graphics as needed and get a ton of functionality for free, such as being resizable, degradable to smaller devices, etc. along with a lot of really fancy stuff the big boy websites have.

The best part about really popular frameworks is you can find many templates available where someone else has already done a bunch of color schemes and custom buttons for that particular framework. This makes it real trivial to cut and paste your way to your first valid HTML 5 / CSS 3 site that does some really cool stuff. Took me about 2 days to hack my way through my first site that uses a fairly complex framework and after that it's much faster now that I know what and where to edit it to make it do what I want.

Basically, you upload the framework files to the server, include them in your HTML as usual, and then change the HTML to use the framework CSS classes.

It looks more daunting than it really is.