SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)

    A Slight Problem

    I need a way to use the same page to have my header and menu stay the same (via includes) but change the main content of the page via link?page= type set up. Can someone give me the code I could do this with, or, even better, give me a better way to do this that doesn't involve having to put the menu and header include tags all over the place.

    Thanx in advance.

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    If you mean that you want to make content that will be repeated on multiple pages, come form a single file you can include it with this.

    Code:
    <? include('includes/footer.php'); ?>
    Though this is more of a PHP question, and I am no PHP guru so that is about as far as I can help you.

    Later
    Johnny

  3. #3
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    That is sort of backwards to what I want to do. I will try and clarify.

    I have a page that has the header and menu pulled in with <!-- #include -->. I then have my main content area. I want to be able to change that content area by doing something such as having a thePage.asp?page=contentPage.asp. I need to know the code to do this switch with either ASP or Javascript. Or, do be told better way.

    (My host server only has support for ASP server-side)

  4. #4
    SitePoint Enthusiast roloenusa's Avatar
    Join Date
    Mar 2004
    Location
    Moorpark
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think the mods should transfer this one to the asp forum!!

    Otherway.. You can do server.execute but it's not too efficient.. the best way to go is with cases.. I have a similar threat.

    click in my name and look in my posts for dynamic content. I started the thread... that should help you out!


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
  •