![]() |
|
|
|||||||
![]() |
HTML - Software for Creating and Applying Templates Accross a Whole Site |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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. Hardeep Rakhra |
|
|
|
|
#2 |
|
Posts: n/a
|
In article <bthidi$77hg1$>,
Hardeep Rakhra <> wrote: > 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/> -- Kris erlands (nl) |
|
|
|
#3 |
|
Posts: n/a
|
In article <bthjhl$7dv4d$>,
Hardeep Rakhra <> wrote: > > It is called CSS. > > <http://www.w3.org/TR/REC-CSS2/> > > > > 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. Group elements sufficiently so you will not need new ones later. <http://www.csszengarden.com/> may have too many container elements, but it surely shows my point. > 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? -- Kris erlands (nl) |
|
|
|
#4 |
|
Posts: n/a
|
Hardeep Rakhra wrote:
> 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. http://dorward.me.uk/www/frames/#worm -- David Dorward <http://dorward.me.uk/> |
|
|
|
#5 |
|
Posts: n/a
|
Hardeep Rakhra wrote:
> 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. -- Toby A Inkster BSc (Hons) ARCS Contact Me - http://www.goddamn.co.uk/tobyink/?page=132 |
|
|
|
#6 |
|
Posts: n/a
|
Hardeep Rakhra wrote:
> Kris wrote: > >> In article <bthidi$77hg1$>, >> Hardeep Rakhra <> wrote: >> >> It is called CSS. >> <http://www.w3.org/TR/REC-CSS2/> >> > > 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. -- cheers, m at mbstevens.com |
|
|
|
#7 |
|
Posts: n/a
|
m wrote:
> > 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. |
|
|
|
#8 |
|
Posts: n/a
|
Kris wrote:
> In article <bthjhl$7dv4d$>, > Hardeep Rakhra <> wrote: > > 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. |
|
|
|
#9 |
|
Posts: n/a
|
m wrote:
> If you don't have access to 'nix, here is a little perl program to replace > cat What's wrong with DOS "type"? -- Toby A Inkster BSc (Hons) ARCS Contact Me - http://www.goddamn.co.uk/tobyink/?page=132 |
|
|
|
#10 |
|
Posts: n/a
|
Hardeep Rakhra wrote:
> m wrote: >> >> 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. 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: include in a single line of code. |
|