Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Software for Creating and Applying Templates Accross a Whole Site

Reply
Thread Tools

Software for Creating and Applying Templates Accross a Whole Site

 
 
Hardeep Rakhra
Guest
Posts: n/a
 
      01-07-2004
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.

 
Reply With Quote
 
 
 
 
Kris
Guest
Posts: n/a
 
      01-07-2004
In article <bthidi$77hg1$(E-Mail Removed)-berlin.de>,
Hardeep Rakhra <(E-Mail Removed)> 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
http://www.velocityreviews.com/forums/(E-Mail Removed)erlands (nl)
 
Reply With Quote
 
 
 
 
Kris
Guest
Posts: n/a
 
      01-07-2004
In article <bthjhl$7dv4d$(E-Mail Removed)-berlin.de>,
Hardeep Rakhra <(E-Mail Removed)> 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
(E-Mail Removed)erlands (nl)
 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      01-07-2004
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
 
Toby A Inkster
Guest
Posts: n/a
 
      01-07-2004
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
 
m
Guest
Posts: n/a
 
      01-07-2004
Hardeep Rakhra wrote:

> Kris wrote:
>
>> In article <bthidi$77hg1$(E-Mail Removed)-berlin.de>,
>> Hardeep Rakhra <(E-Mail Removed)> 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
 
Hardeep Rakhra
Guest
Posts: n/a
 
      01-07-2004
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
 
Hardeep Rakhra
Guest
Posts: n/a
 
      01-07-2004
Kris wrote:

> In article <bthjhl$7dv4d$(E-Mail Removed)-berlin.de>,
> Hardeep Rakhra <(E-Mail Removed)> 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
 
Toby A Inkster
Guest
Posts: n/a
 
      01-07-2004
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
 
m
Guest
Posts: n/a
 
      01-07-2004
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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
*WITHOUT* using: ValidateRequest="False" for the whole page (or my whole site).... \A_Michigan_User\ ASP .Net 2 08-21-2006 02:13 PM
how to Specializations of function Templates or Overloading Function templates with Templates ? recover C++ 2 07-25-2006 02:55 AM
Templates templates templates JKop C++ 3 07-21-2004 11:44 AM
Applying XSL templates dynamically Kimmo XML 2 07-07-2004 06:07 AM
Re: Too simple : applying a font to the whole document Matthieu Gaillet HTML 2 04-05-2004 03:46 PM



Advertisments