Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Jul 2007
    Posts
    7
    Member #
    15596
    Hello
    What I understand frame based layouts are not that nice. I don't like them either anyways, so I go with an ordinary approach: http://samel.no-ip.org/bio
    I made that wepage for a cinema. However, the old web site uses frames (the guy uses Microsoft Frontpage and is used to it). While frames are not that nice IMHO, it still is easy to change "menu links". If I would like to add or change a menu link in my web site, I would have to change every ouccurence of the menu.
    How do I solve this problem? Can I centralize the changing so that if I would like to change the "kontakt" link from "kontakt.html" to "hello.html", I could change it at one place?
    I would be happy if I could do this with just (x)html and css.
    If not, are there any free software tools that easy can change the same texts in all html files to something new. Something similar to the unix sed command, but with a GUI?
    Thanks!

  2.  

  3. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    Hatfield, England
    Posts
    855
    Member #
    9790
    Use php.

    Create 2 folders

    Siteroot
    Siteroot/templates

    index.php
    Code:
    <body>
    <?php include 'templates/header.htm' ?>
    <!-- Rest of Content -->
    </body>
    Save pages as .php

    Alternatively, create your site from the same page.

    Code:
    <body>
    <?php include 'templates/header.htm'; 
    if (isset($_GET['page'])) {
    switch ($_GET['page']) {
    case 'about':
        include 'templates/about.htm';
        break;
    case 'bio':
        include 'templates/bio.htm';
        break;
    default:
        include 'templates/home.htm';
    }
    } else {
        include 'templates/home.htm';
    }
    
    include 'templates/footer.htm';
    ?>
    </body>
    Your page URL's would then be site/index.php?page=nameofpage

  4. #3
    Junior Member
    Join Date
    Jul 2007
    Posts
    7
    Member #
    15596
    Thanks for the fast reply! And thanks for the help! Is the second way the "real" way to go? It looks for php:ich...

  5. #4
    Junior Member
    Join Date
    Jul 2007
    Posts
    7
    Member #
    15596
    Oh, and by the way, validator.w3.org says it's wrong to do a link out of this header:
    Code:
    <a href="index.html"><h1>tomelilla-brösarps <span>biografförening</span></h1></a>
    I tried to put the header text in an object tag but then it "blinked" when switching pages.
    Do you have any suggestions?

  6. #5
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    Try changing it to

    Code:
    <h1><a href="index.html">tomelilla-brösarps <span>biografförening</span></a></h1>
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Yes, what karinne said. h1 is a block-level element, a is an inline element. Block-level elements can typically contain both other block-level elements and inline elements, but inline elements can typically not contain block-level elements (the actual rules vary by element, but this is a good rule of thumb).

    Perad: You seem to be missing single quotes on the end of the strings in your case clauses

    samel: The general approach is the "real" way to go, yes, though the specific PHP implementation is not the only one. You can also do this with so-called `server-side includes':

    HTML Code:
    <html
      <head>
      <!-- stuff -->
      </head>
    
      <body>
        <!--include file="header.html" -->
        <!-- other content -->
      </body>
    </html>

  8. #7
    Junior Member
    Join Date
    Jul 2007
    Posts
    7
    Member #
    15596
    I tried it the way you said karinne and it worked fine. Had to change some css stuf but that was to be expected.

    Thanks for the help y'all!

  9. #8
    Senior Member imagn's Avatar
    Join Date
    Jul 2007
    Location
    Los Angeles
    Posts
    156
    Member #
    15594
    We've found that it's actually better SEO-wise to not wrap links in "H" tags


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:36 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com