Jump to content

Using 2 HTML Files In One Page

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

Using 2 HTML Files In One Page Rate Topic: ***** 1 Votes

#21 User is offline   TJSingleton 

  • Allegedly Legendary
  • Group: Members
  • Posts: 517
  • Joined: 31-July 06
  • Location:Winder, GA

Posted 10 February 2007 - 10:14 AM

Who is the host?
0

#22 User is offline   ultra99 

  • W.R. Corporal
  • Group: Members
  • Posts: 95
  • Joined: 02-February 07

Posted 10 February 2007 - 10:28 AM

http://www.awardspac...eb_hosting.html

free hosting, and they support SSI.
0

#23 User is offline   Ben Abrams 

  • The buddy system:never fails
  • Group: Administrators
  • Posts: 1,850
  • Joined: 04-April 06
  • Gender:Male

Posted 10 February 2007 - 10:36 AM

do the htaccess solution then, and see what happens

View PostSirkent, on 21 September 2007 - 04:26 AM, said:

<monty python high-pitched female voice>I DON'T LIKE SPAM!</monty python high-pitched female voice>
0

#24 User is offline   ultra99 

  • W.R. Corporal
  • Group: Members
  • Posts: 95
  • Joined: 02-February 07

Posted 10 February 2007 - 10:50 AM

umm...*cough cough*...this is embarrassing :blush:

i tried it with the .htaccess and it worked. then i removed that file to try again and it worked. so probably it worked from the beginning but i might have done something wrong.

This post has been edited by ultra99: 23 February 2007 - 02:31 AM

0

#25 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 10 February 2007 - 11:02 AM

Never feel embarrassed around here, most of us only act like we know what we're doing anyway... :ninja:
0

#26 User is offline   ultra99 

  • W.R. Corporal
  • Group: Members
  • Posts: 95
  • Joined: 02-February 07

Posted 10 February 2007 - 11:22 AM

So now I just copy the html code in a text file, say layout.txt, and then add this tag: <!--#include virtual="/layout.txt" --> to every new page i want to add text in? and them as .shtml? What about the css file?
0

#27 User is offline   Ben Abrams 

  • The buddy system:never fails
  • Group: Administrators
  • Posts: 1,850
  • Joined: 04-April 06
  • Gender:Male

Posted 10 February 2007 - 12:46 PM

css is embedded differently,

<link href="style.css" rel="stylesheet" type="text/css">


This code needs to be in the head
so you going to include the file, with this code in..if you follow

View PostSirkent, on 21 September 2007 - 04:26 AM, said:

<monty python high-pitched female voice>I DON'T LIKE SPAM!</monty python high-pitched female voice>
0

#28 User is offline   ultra99 

  • W.R. Corporal
  • Group: Members
  • Posts: 95
  • Joined: 02-February 07

Posted 10 February 2007 - 02:03 PM

I did that and it worked. But I get the same text. That means I have to have a txt file for each page?
0

#29 User is offline   ultra99 

  • W.R. Corporal
  • Group: Members
  • Posts: 95
  • Joined: 02-February 07

Posted 11 February 2007 - 11:22 AM

help? :wacko: :confused1:
0

#30 User is offline   benbacardi 

  • Administrator
  • Group: Administrators
  • Posts: 1,140
  • Joined: 06-April 06
  • Gender:Male
  • Location:United Kingdom

Posted 11 February 2007 - 12:09 PM

I'm going to just write something how *i* personally do it, and see if you can follow it.

1. I code up one page looking how I want the whole site to look (the index page).

2. I figure out where the content is in the code, the stuff that will change between each page.

3. I take everything above that and put it into a file called "top.inc", replacing that code in the index page with an include call to the file "top.inc" (whether that be a PHP include, an ASP include, or an SHTML include, whatever)

4. I take everything below that and put it into a file called "bottom.inc", again, replacing that code in the index page with an include call to the file "bottom.inc", just as before

5. I then just duplicate the index page for as many pages as I need, changing the content.

6. Any changes I need to make to anything that's above the content, I can change on one page, "top.inc". This file normally contains the DOCTYPE, the <head>, the link to the CSS file, all the information, and the top part of the <body>. Any changes made to top.inc will reflect in every other page.

7. Any changes I need to make to anything that's below the content, I can change on one page, "bottom.inc". This file normally contains the closing </body> and </html> tags etc, everything after the content. Again, any changes made to bottom.inc will reflect in every other page.

8. If you like, top.inc and bottom.inc could be split into further includes, like menu.inc or things like that. That's it, that's how its done.

Does that make sense?
0

#31 User is offline   ultra99 

  • W.R. Corporal
  • Group: Members
  • Posts: 95
  • Joined: 02-February 07

Posted 15 February 2007 - 12:01 PM

Yeah, it makes sense. It worked with about.shtml. But about the index file, .html or .shtml? I tried both but none worked....I mean just the text that appeared not the layout.


I always think that I should copy and paste every time and forget about SSI, too much hassle. But yet I always say no, I have to get into the habit of doing SSI because it's something good to learn and good for the future..........correct?

This post has been edited by ultra99: 15 February 2007 - 12:51 PM

0

#32 User is offline   benbacardi 

  • Administrator
  • Group: Administrators
  • Posts: 1,140
  • Joined: 06-April 06
  • Gender:Male
  • Location:United Kingdom

Posted 15 February 2007 - 12:49 PM

it definately improves the speed of website maintenance!
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users