SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    m
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink is there a way to generate many pages, with slight difference, automatically?

    Hi,
    is there a way, maybe with some program, to generate many almost identical pages, that are different in one word?

    for example create the same page 20 times from a certain template, and have one word that's placed in the code, different on each of the 20 pages?

    hope you understand what I mean

    thanks!

  2. #2
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use a server-side scripting language to accomplish such a task should you want to do it dynamically. However, if you want to do it so that 20 pages exist on the server, then I'm afraid I cannot help much.

    -Colin
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  3. #3
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Have you looked into doing it with SSI?

    You could include a link to the header, then the one word, then a link to the footer in every page.

    Then you'd store the header and footer elsewhere so it was the same file used for all those others.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  4. #4
    SitePoint Zealot
    Join Date
    Oct 2002
    Posts
    158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sharock...

    there are various ways to do this, and they all depend on how the pages are going to be called?

    For example.. am I going to be clicking links to view these pages? Or am I going to go directly to the pages by typing in the URI in my browser?

    If the pages are going to be called by links and your web server has PHP installed this would be very easy...

    simply create ONE page from the template and make the body of your page look like this:

    <body>
    <? print $HTTP_GET_VARS["word"]; ?>
    </body>

    save it as myfile.php

    and for the link to this page use this:

    <a href="myfile.php?word=test">Link to myfile.php</a>

    ... Now.. when you click on that link you will see the word "test".

    Hope this helps...
    Last edited by shoebox; Oct 10, 2002 at 19:35.

  5. #5
    Degrading Gracefully PalmerB's Avatar
    Join Date
    Sep 2001
    Location
    Ohio - U.S.A. Outlook: Cautiously Optimistic
    Posts
    3,283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seems like you could also accomplish this with a JavaScript include. There are scripts that are written that will output a random quote with each refresh of the page.

    Here's a link to the category at HotScripts...
    http://www.hotscripts.com/JavaScript...g/Random_Text/

    You would then use an include in your html (warning 2 Pop ups ) ...
    http://javascript.about.com/library/.../aa102901a.htm

    Good luck,
    Palmer


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •