Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - Software for Creating and Applying Templates Accross a Whole Site

 
Thread Tools Search this Thread
Old 01-07-2004, 06:16 PM   #1
Default Software for Creating and Applying Templates Accross a Whole Site


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
  Reply With Quote
Old 01-07-2004, 06:27 PM   #2
Kris
 
Posts: n/a
Default Re: Software for Creating and Applying Templates Accross a Whole Site

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)
  Reply With Quote
Old 01-07-2004, 07:18 PM   #3
Kris
 
Posts: n/a
Default Re: Software for Creating and Applying Templates Accross a Whole Site

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)
  Reply With Quote
Old 01-07-2004, 07:19 PM   #4
David Dorward
 
Posts: n/a
Default Re: Software for Creating and Applying Templates Accross a Whole Site

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/>
  Reply With Quote
Old 01-07-2004, 07:20 PM   #5
Toby A Inkster
 
Posts: n/a
Default Re: Software for Creating and Applying Templates Accross a Whole Site

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

  Reply With Quote
Old 01-07-2004, 07:39 PM   #6
m
 
Posts: n/a
Default Re: Software for Creating and Applying Templates Accross a Whole Site

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
  Reply With Quote
Old 01-07-2004, 08:09 PM   #7
Hardeep Rakhra
 
Posts: n/a
Default Re: Software for Creating and Applying Templates Accross a WholeSite

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.

  Reply With Quote
Old 01-07-2004, 08:10 PM   #8
Hardeep Rakhra
 
Posts: n/a
Default Re: Software for Creating and Applying Templates Accross a WholeSite

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.

  Reply With Quote
Old 01-07-2004, 08:19 PM   #9
Toby A Inkster
 
Posts: n/a
Default Re: Software for Creating and Applying Templates Accross a Whole Site

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

  Reply With Quote
Old 01-07-2004, 08:36 PM   #10
m
 
Posts: n/a
Default Re: Software for Creating and Applying Templates Accross a Whole Site

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:arser module, which you
include in a single line of code.


  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump