Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

My website for my music - help with navigation/content loading...

Featured Replies

Hi all

 

This is my current, super-simple website. Sadly, I'm not famous and don't have somebody to do it for me, so I do it myself :)

 

http://www.stevemccormick.co.uk/

 

Here is a test page for what I've been working on, using CSS (borrowed from tutorials and edited) for a header/footer.

 

http://www.stevemccormick.co.uk/indextest.html

 

What I want is to be able to keep the header and footer on all pages and load the content somehow, not with frames, hopefully something where every page is searchable/findable via engines.

 

Can anybody advise?

 

I'd also quite like to be able to do little ad boxes where I can update an external file and update all references within the site.

 

Thanks in advance!

 

Steve

you need to do some includes.

 

this will depend on whether your server is linux or a windows server.

 

Whatever the type of server, the process is the same. You need to create separate files for each element.... header, footer, sidebar etc and then when you create a page, you just include those pages when you are generating your content.

 

  1. The first thing you need to do is create a file called header.php. In this file you will hold all of your page design that comes before your content. Here is an example:
     
    <html>
    <head><title>My Site</title></head>
    <body>
    <h2>My Site Title</h2><p>
    My Site menu goes here........... Choice 1 | Choice 2 | Choice 3
    <hr>


  2. Next we need to make a file called footer.php. This file will contain all of the site design information that goes below the content. Here is an example:
     
    <hr>
    <small>Copyright 2008 My Site</small><br>
    </body>
    </html>

  3. Finally you need to create the content pages for your site. In this file you will:
    1. Call the header file
    2. Put in the page specific content
    3. Call the footer file

Here is an example of how:

 

 

 

<?php include 'header.php'; ?>
<b>Sub-Page Title</b><p>
Here is the specific content of this page....<br>
<?php include 'footer.php'; ?>

Tips:

  1. Remember to save all your files with the .php extension.
  2. You can have more than a header and a footer, if needed create other files to include in the middle and call them the same way!
  3. Couple this with the use of a style sheet to change style within the page exclusive content easily as well.

Edited by Sam G
added [code] tags

Do you mean you want to load the content without page refreshes (ajax)? Or create a global header and footer (like above using includes).

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.