homepage Welcome to WebmasterWorld Guest from 54.237.99.131
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
templates
the best way
whatson

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4463032 posted 5:23 pm on Jun 8, 2012 (gmt 0)

I was wondering what is the best way in php to create templates?

 

rocknbil

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



 
Msg#: 4463032 posted 8:10 pm on Jun 8, 2012 (gmt 0)

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.

phpguy



 
Msg#: 4463032 posted 8:16 pm on Jun 8, 2012 (gmt 0)

Smarty templates

incrediBILL

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



 
Msg#: 4463032 posted 9:27 pm on Jun 8, 2012 (gmt 0)

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.

whatson

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4463032 posted 1:14 am on Jun 9, 2012 (gmt 0)

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.

incrediBILL

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



 
Msg#: 4463032 posted 7:59 am on Aug 12, 2012 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved