Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm a web developer. When I start designing a site, I use a framework to handle templating for me, even if it's just rack + erubis.

What do non-developers do? If you want to implement a site in HTML and CSS without a framework running on a webserver, without frames, and without WYSYWIG tools like Dreamweaver... how do you avoid copy-and-pasting the HTML of your navigation (for example) on every single page you're writing?

I feel stupid asking this because it seems like their must be an obvious answer, but for the life of me, I can't think of one right now.

share|improve this question

closed as off topic by John Conde Jun 24 '12 at 0:56

Questions on Webmasters Stack Exchange are expected to relate to webmastering within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

If they know the slightest bit of PHP, they can do an include_once('filename'); function. This is done a lot with header.html and footer.html files. CSS can be pulled from a single file across many many pages of HTML, and if they are done right, effectively provides a "template" system. Images can be included as different sizes in CSS as well.

Alternatively, someone can set up a single PHP page with lots of static stuff, then pull the content (images and text) from a database.

Or simpler, they can hire a real web-developer.

"...Without a framework running on a webserver, without frames, and without WYSYWIG tools like Dreamweaver"

They don't need any framework, but without PHP or some sort of processing, there's not going to be any templating without copy and pasting blocks of HTML and changing the content. PHP makes it simple even for beginners to include many different files into one page. A CMS or Content Management System makes it simple for EVERYONE to have decent-looking and mostly-proper(ly) coded sites.

Dreamweaver isn't really a WYSYWIG editor; I mean, I use it personally for the syntax-highlighting aspect of it along with PHPDesigner. I think the graphical aspect of it isn't great though.

Refer here: http://en.wikipedia.org/wiki/Web_template_system for all the different types of templating for web design and/or development.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.