HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
including an external html file questions
Goto page Previous  1, 2
Post new topic   Reply to topic    HTML Help Forum -> General HTML
View previous topic :: View next topic  
Author Message
sticks464



Joined: 31 Dec 2006
Posts: 2626

PostPosted: Thu Sep 03, 2009 8:13 pm     Reply with quote

The goal of this is to have all your content on separate pages inside a folder called pages. The php function inside the content div on the index page tells the server to go to this folder and get the page name associated with the link on the menu.
Example:
This line tell the index page to show the content from a page named home.php that is inside the pages folder.
Code:
@include ('pages/home.php');


Inside your pages folder you will have pages named
home.php
available.php
breeders.php
caresheet.php
contact.php
terms.php
and should also contain pages for the two links that use images
Code:
<h1>Gecko Care Sheets</h1>
<h3 class="style15">Select which type of Rhacodactylus gecko you would like info on.</h3>
<a href="?pg=crestedcaresheet"><img src="Cresteds/Crested Care Sheet.jpg" alt="Crested Gecko Care Sheet" border="0" /></a> | <a href="?pg=gargcaresheet"><img src="Cresteds/Garg Care Link.jpg" alt="Gargoyle Gecko Care Sheet" border="0" /></a>


When a link is clicked either from those two or the menu, the entire page does not reload, only the content in the content div which is supplied by the individual pages in the pages folder.

When I said earlier to set up a master folder, I was getting you to simulate how your server is set up. You upload your files to a master folder that has a name like public_html, htdocs, or something simuliar. When you upload the files you do not upload the master folder, only what is inside it. This folder and also the one on the server is called the root folder. index.php has to be in the root folder for it to be found and displayed when the url is typed in the address bar. index.php then goes to each sub-folder and extracts what it need for displaying whether it be a javascript file, an image or additional content. Loading javascript files and images only once cuts the server load and also load time.

Your menu would look like this
Code:
<div id="sideBar">
   <a href="#" id="sideBarTab"><img src="images/slide-button.gif" alt="sideBar" title="sideBar" /></a>
   <div id="sideBarContents" style="display:none;">
      <div id="sideBarContentsInner">
         <h2>navigation</span></h2>
         <ul>
            <li><a href="?pg=home">Home</a></li>
            <li><a href="?pg=available">Available</a></li>
            <li><a href="?pg=breeders">Breeders</a></li>
            <li><a href="?pg=caresheet">Care Sheet</a></li>
            <li><a href="?pg=contact">Contact</a></li>
                <li><a href="?pg=terms">Terms</a></li>
         </ul>
      </div>
   </div>
</div>
renzema



Joined: 03 Sep 2009
Posts: 10

PostPosted: Thu Sep 03, 2009 10:15 pm     Reply with quote

ok so I used the link section in your last post and it worked perfectly.
I copied your files exactly as you said in the last post. Everything is right where it should be and is copied word for word.
So now how to get it on the webpage? That is the last thing I still can't figure out, but at least everything is loaded up on the site and works.
renzema



Joined: 03 Sep 2009
Posts: 10

PostPosted: Thu Sep 03, 2009 10:21 pm     Reply with quote

Ok just read your last post. I am going to have reoragnize my files on the server because they are not like that at all and are very disorganized. I do see what you are talking about. I understand how to insert the sidebar, but still can't figure out the part of locking it to the side of the browser window.
sticks464



Joined: 31 Dec 2006
Posts: 2626

PostPosted: Fri Sep 04, 2009 3:57 am     Reply with quote

The sidebar is locked in place with css (position: fixed;) in the menu.css file.

Can you give a list of the folders and files that are on your server now and what is the root folder name you are putting all files into?
renzema



Joined: 03 Sep 2009
Posts: 10

PostPosted: Fri Sep 04, 2009 12:22 pm     Reply with quote

So this must be beyond what i can do. I have copied it exactly to what you have said to do and it doesn't work. I am very frustrated at this point and honestly I think I am way over my head.
I understand what you have done and how it all goes together but I just can't trouble shoot it. I have tried to comb through all of it and it looks right but nothing executes when I have the php file set up the way you have it. If I just use the sidebar code it works perfectly. I can get the side bar to work but its the problem of getting it on the page.
So after all this I am right back to where I started.

As for site organization, the sidebar file is here. If I try to just open the index.php I get a big white page nothing.

ftp://www.caledonianexotics.com/Templates/Sidebar/index.php

I am in the process of changing everything so just the index.html is in the root menu. Then I am going to organize every page in their own files so it's easier to use.

I appreciate all the help, I didn't expect anyone to help me this much.
JR
sticks464



Joined: 31 Dec 2006
Posts: 2626

PostPosted: Fri Sep 04, 2009 1:31 pm     Reply with quote

I just sent you a pm.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> General HTML All times are GMT - 8 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial