Software for Creating and Applying Templates Accross a Whole Site

H

Hardeep Rakhra

Hi,

Anyone able to recommend some preferable free software that allow to to
define a template and create multiple pages from it and then auto update
those pages when i alter the template.

Basically the same kind of functionality macromedia dreamweaver provides.

Hardeep.
 
K

Kris

Hardeep Rakhra said:
Anyone able to recommend some preferable free software that allow to to
define a template and create multiple pages from it and then auto update
those pages when i alter the template.

Basically the same kind of functionality macromedia dreamweaver provides.

It is called CSS.
<http://www.w3.org/TR/REC-CSS2/>
 
K

Kris


Using CSS for everything but the kitchen sink. But what happens when i
add an extra div container. no about of tinkering the CSS is gonna make
that extra div appear in the rest of the HTML pages.[/QUOTE]

Group elements sufficiently so you will not need new ones later.
CSS is great for formatting,

HTML is for formatting. You seem to confuse formatting for
presentational effects.

<p>This is a paragraph</p>

p { color: white; background: red; padding: 1em; border: 2px solid
black; } // makes all paragraphs look like red boxes
but a template, is a template, is a template.

This can be a start:

<body>

<div id="wrap">
<div id="box">

<div id="content">

....

</div>

<div id="navigation">

....

</div>

</div>
</div>

</body>

No need to change this with every change of looks.
Like i said, dreamweaver does this nicely, but looking for a smaller and
free alternative.

Notepad is small and free.
I have no need for WYSIWYG editors.

Notepad is not WYSIWYG.

Shall I giftwrap it for you? :)
 
T

Toby A Inkster

Hardeep said:
Anyone able to recommend some preferable free software that allow to to
define a template and create multiple pages from it and then auto update
those pages when i alter the template.

Look into things like SSI and PHP.
 
M

m

Hardeep said:
Using CSS for everything but the kitchen sink. But what happens when i
add an extra div container. no about of tinkering the CSS is gonna make
that extra div appear in the rest of the HTML pages.

CSS is great for formatting, but a template, is a template, is a template.

Like i said, dreamweaver does this nicely, but looking for a smaller and
free alternative. I have no need for WYSIWYG editors.

Write a script in your scripting language that makes a number of
calls like this, using the 'nix cat program:

cat header.txt bodyhead.txt \
body.txt bodycenter.txt bodybottom.txt \
footer.txt > done.html

.....where header.txt has the link to your CSS file, or has CSS in it.

If you don't have access to 'nix, here is a little perl program to replace
cat, except you use 'to' instead of '>':

_________________________________________________
#!/usr/bin/perl
# mcat perl
use strict;
my (@f, $f, @ar, $ar, $fout);
do{
$ar = shift;
open(IN , $ar );
push @f, <IN>;
close IN;
} until ($ar eq "to");
$fout = shift;
open(OUT, ">$fout");
foreach $f (@f){
print OUT "$f";
}
close OUT;
# USE:mcat.pl a b c d e [....] to z
# differs from .nix cat with use of 'to' instead
# of '>', but
# should run about anywhere you can install Perl.
# By m b stevens; may be copied, etc. as per
# Gnu licence.
______________________________________________________
You can download Perl free from activestate for winboxes.
Learn just a tiny bit of it and you can make all sorts
of mods to this tiny program, too.

Modify templates from excellent sources like
realworldstyle.com -- make sure they are up to
date.
 
H

Hardeep Rakhra

m said:
Write a script in your scripting language that makes a number of
calls like this, using the 'nix cat program:

cat header.txt bodyhead.txt \
body.txt bodycenter.txt bodybottom.txt \
footer.txt > done.html

That sounds like a possible fix for my problem. I also just remembered
that i used to have a scriptable search and replace program that may be
able to help with the aid some some cleverly placed markers in my code.

Thank you for that,

Hardeep.
 
H

Hardeep Rakhra

Kris said:
Notepad is not WYSIWYG.

Shall I giftwrap it for you? :)

Okay, yes i understand all of the above and if you saw my code, it'd
look just as you said above. And with careful planning you can avoid any
need to make base level changes.

But sometime you need to make alterations. Plus i'm not that much into
forward thinking and planning.

Hardeep.
 
M

m

Hardeep said:
That sounds like a possible fix for my problem. I also just remembered
that i used to have a scriptable search and replace program that may be
able to help with the aid some some cleverly placed markers in my code.

If the one you have doesn't match your expectations,
these kinds of little filtres are an excellent exercise
in learning a language.
The one I use is 40 lines of Perl. Here's the gut
subroutine. I leave the rest as an exercise:

#-----------------------
sub filt {
foreach $line (@f) {
if ($line =~ /PROCESSHERE/) {
processline ($line);
} else {
push @modf, $line;
}
}
}
#------------------------------------------------

You could also use your own XML tags, and process
them with the Perl XML::parser module, which you
include in a single line of code.
 
M

m

....(the forwardslashes around PROCESSHERE
didn't show up in my newsreader, and may not
in yours.)
 
M

m

Toby said:
What's wrong with DOS "type"?

I suspected someone would be able to supply the missing
command from the DARK (oops, I mean DOS) side. My docs
show it only being able to append one file to another, but
an extended script should do it easily.
 
E

Eric Bohlman

You could also use your own XML tags, and process
them with the Perl XML::parser module, which you
include in a single line of code.

If you're going to do that, though, you'd probably be better off writing
XSLT code to do the preprocessing, using a standalone XSLT processor
(though you could easily build one in Perl using XML::LibXML and
XML::LibXSLT). BTW, most the people doing XML work in Perl recommend that
XML::parser not be used directly in application-level code anymore; the
preffered method of event-driven parsing is to use XML::SAX.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top