Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Website Project?

So i'm making a personal buisness but im stuck. I finished the site and it looks dope but the thing is i the menu bar i want to link it to another page but in the same website? a page that looks the same as the home but has different content than home? i dont know if you dudes understand? Like a website using the same code how do i do that?

4 Answers

So you to make two EXCAT same webpages?

Have you tried that before? Can i see your personal website?

Sorry I don't have one...I'm just a thirteen year old student and would not like to spend money on unnecessary things for me right now.

What's so expensive about hosting sites and buying a domain?

Nothing I just don't have the money to spare.

Use a server side language like PHP or Ruby to put your similar code into templates that can be used within any page you want.

You make multiple html files and put them all in the same folder as the css. Name the html files the menu words. Link them in the html with anchor tags, using relative paths.

Is that what you were asking? Come to think of it I don't remember seeing this in any Treehouse video so far. It's a basic thing though. I learned it reading Head First HTML a couple of years ago.

What you're describing sounds like PHP includes. There's a video about it in the Beginner PHP Project series.