myrebel420
myrebel420

Reputation:

CSS / Template question

How do I turn the site I just made (html+css) into a template? I want to be able to have one master template to use for all the pages on my site like I am able to do in dreamweaver, can I do stuff like that outside of DW? I am kinda sorta new to this....

Upvotes: 3

Views: 882

Answers (5)

Samuel Parkinson
Samuel Parkinson

Reputation: 3100

Take a look at PHP includes.

<?php include('header.html'); ?>
<p>The main part of a page.</p>
<?php incluse('footer.html'); ?>

http://www.w3schools.com/PHP/php_includes.asp

Upvotes: 1

avdgaag
avdgaag

Reputation: 42152

You could also try static-site generators like jekyll or nanoc. These two are Ruby-powered (so experience with Ruby would help) but I'm sure there are more variants.

Upvotes: 1

Chook2330
Chook2330

Reputation: 21

The beauty of templates in Dreamweaver is that you can make a change to the template and it will automatically change all the pages that use the template. If your site is going to start small, you could think carefully about your basic page design, create your "template" and then copy it every time you want a new page. Then, when you want to make changes, simply repeat the change on each page. When your site gets larger, perhaps Dreamweaver will be worth investing in. You could then save your "template" as a Dreamweaver template and apply it to your pages.

There are also other cheaper software options, depending on your or your customer's requirements, though Dreamweaver is the most commonly used.

Upvotes: 1

Matt
Matt

Reputation: 2902

The easiest way to do this, without programming experience, is through the use of Server-side includes

Upvotes: 2

Paul
Paul

Reputation:

You'll probably need to take up a web scripting language like php. You may want to learn a website framework like Wordpress or MovableType, etc. Depending on your choice, you'll need to name your relevant content blocks and provide access to them via whichever framework you choose. Smarty is another example.

Upvotes: 1

Related Questions