SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: What does this?

  1. #1
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What does this?

    I am trying to do something simple to work on my skills and also have something useful for my job, it'll have many many pages, but things like the menu could possibly change as things are added/removed. I would hate to change each page one by one just to change this type of redundant information.

    What would be best to use? I'd like to try to build a template and input the information I need into that, I am sure PHP could do that but I need something up and running soon, then later I could possibly try PHP becuase that's on my list of things to learn.

    Thanks!

  2. #2
    SitePoint Zealot soezzy's Avatar
    Join Date
    Jul 2005
    Location
    The other side of the keyboard.
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do it in php, or you can do it with css, which ever way you go you will just have to reference the style you want expressed on any page in the correct way, you can label heading in css heading 1, heading 2, etc. Each heading can be totally different, or nearly the same, your choice.

    When scripting the php, (if you choose this route), you can include or exclude any item on any page using "if" statements.

    The really difficult choice is what you want to concentrate on first and what you want to learn about first, this is where you need to spend some thought and time in order to make this whole thing work well for you.
    It’s just my 2˘.
    Don't pay any attention to me!
    What the heck do I know anyway?

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can also use server-side includes if you don't have PHP on your host's server.

  4. #4
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by soezzy
    You can do it in php, or you can do it with css
    CSS can't change the content of your links for you though (which surprisingly a lot of people come to the conclusion of because they've heard you can 'control' a whole site with a single file).
    PHP or server side includes are the way to go and you don't even need to know any scripting to use them as an include file can contain just straight HTML.

  5. #5
    SitePoint Zealot soezzy's Avatar
    Join Date
    Jul 2005
    Location
    The other side of the keyboard.
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Tyssen
    CSS can't change the content of your links for you though (which surprisingly a lot of people come to the conclusion of because they've heard you can 'control' a whole site with a single file).
    Thanks for the elaboration, your correct and I did not mean to make it sound like it could.

    I know from your response, you understand what I was trying to say about including and excluding, using css, not attempting to alter content with it.
    It’s just my 2˘.
    Don't pay any attention to me!
    What the heck do I know anyway?

  6. #6
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So server side includes are the way to go? What should I search for to work on this?

  7. #7
    Now available in Orange Tijmen's Avatar
    Join Date
    Jul 2004
    Location
    The Netherlands
    Posts
    1,469
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    These 2 links should get you started with server side includes.

    ssi developer
    websitetips ssi
    Travel Photos on Flickr - Twitter

    “Never give up. Never surrender”

  8. #8
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Tijmen
    These 2 links should get you started with server side includes.

    ssi developer
    websitetips ssi
    Great! Thanks, I'll begin reading now. Hopefully, I won't run into many more problems, this project has been a living nightmare.

    ****

    OK actualy after read a bit into the first article I thought of something, I am working on Apache with MySQL and PHP of course, but the server this is going to be running on in the end is IIS with MSSQL and I don't know about what version of PHP it'll have. Is this just going to cause more problems?

  9. #9
    SitePoint Zealot
    Join Date
    Oct 2006
    Location
    Syracuse, NY
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would go with php...

    1. first write your navigation code inside of your existing XHTML document:

    -----------example:--------------
    <div id="nav_list">
    <a href="index.php" title="home">Home</a>
    <a href="aboutme.php" title="about me">About</a>
    <a href="bookmarks.php" title="bookmarks">Bookmarks</a>
    </div>
    ---------------------------------

    2. make a new document in your html editor, and paste that nav code into it. save it out as nav.php

    3. back to your main XHTML doc, replace the nav code you copied from before and replace it with this php include code:

    <?php include 'nav.php'; ?>

    4. now save that page out with a .php extension. this goes for all pages that will use the navigation (basically every page on your site)

    5. basically, the main XHTML document finds the nav.php document and then renders the code. i would suggest making include files for your header, footer, ads etc... anything that might be changed site-wide in the future should have its own include.

  10. #10
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I have that working now, but the css is broken now... is there something I must do for the CSS file? It's a separate page. And I have it linked in the php file as well.

    Never mind... I forgot to save in the proper directory, ugh :P

  11. #11
    SitePoint Member
    Join Date
    Oct 2006
    Location
    Seattle
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The fun life of a web designer. Just always remeber those spaces in PHP. Ever tried to do a find for <space> :-)
    Web Designer and Telecom Engineer
    http://www.ecarttemplates.com
    http://www.telexus.net


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
  •