Software for Creating and Applying Templates Accross a Whole Site

Discussion in 'HTML' started by Hardeep Rakhra, Jan 7, 2004.

  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, Jan 7, 2004
    #1
    1. Advertising

  2. Hardeep Rakhra

    Kris Guest

    In article <bthidi$77hg1$-berlin.de>,
    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)
     
    Kris, Jan 7, 2004
    #2
    1. Advertising

  3. Hardeep Rakhra

    Kris Guest

    In article <bthjhl$7dv4d$-berlin.de>,
    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)
     
    Kris, Jan 7, 2004
    #3
  4. 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/>
     
    David Dorward, Jan 7, 2004
    #4
  5. 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
     
    Toby A Inkster, Jan 7, 2004
    #5
  6. Hardeep Rakhra

    m Guest

    Hardeep Rakhra wrote:

    > Kris wrote:
    >
    >> In article <bthidi$77hg1$-berlin.de>,
    >> 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
     
    m, Jan 7, 2004
    #6
  7. 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.
     
    Hardeep Rakhra, Jan 7, 2004
    #7
  8. Re: Software for Creating and Applying Templates Accross a WholeSite

    Kris wrote:

    > In article <bthjhl$7dv4d$-berlin.de>,
    > 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.
     
    Hardeep Rakhra, Jan 7, 2004
    #8
  9. 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
     
    Toby A Inkster, Jan 7, 2004
    #9
  10. Hardeep Rakhra

    m Guest

    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::parser module, which you
    include in a single line of code.
     
    m, Jan 7, 2004
    #10
  11. Hardeep Rakhra

    m Guest

    ....(the forwardslashes around PROCESSHERE
    didn't show up in my newsreader, and may not
    in yours.)
     
    m, Jan 7, 2004
    #11
  12. Hardeep Rakhra

    m Guest

    Toby A Inkster wrote:

    > 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"?
    >


    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.
    --
    cheers, m
     
    m, Jan 7, 2004
    #12
  13. Hardeep Rakhra

    Eric Bohlman Guest

    m <> wrote in
    news:D5_Kb.43249$:

    > 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.
     
    Eric Bohlman, Jan 8, 2004
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthieu Gaillet
    Replies:
    2
    Views:
    350
    Jukka K. Korpela
    Apr 5, 2004
  2. Kimmo
    Replies:
    2
    Views:
    1,023
    Kimmo
    Jul 7, 2004
  3. JKop
    Replies:
    3
    Views:
    522
  4. \A_Michigan_User\
    Replies:
    2
    Views:
    939
    \A_Michigan_User\
    Aug 21, 2006
  5. recover
    Replies:
    2
    Views:
    858
    recover
    Jul 25, 2006
Loading...

Share This Page