Guest mds300 Posted August 9, 2010 Report Share Posted August 9, 2010 Hi All, I'm really new to Web design. I've been unemployed for 2 months and pretty much taught myself...so i apologize for what maybe the stupidity of this question I want to have side navigation on each page of my small site. I don;t want the user to leave that page but rather click on a link or button on the side nav and have information just appear on that page that.That is, the old text disappears when the click on a new button and the relevant text appear. Should I be using a Behavior for this? Any help/input would e immensely appreciated! Thx! Quote Link to comment Share on other sites More sharing options...
Wickham Posted August 9, 2010 Report Share Posted August 9, 2010 You want to click on a button in a sidebar and have different content appear in the main panel on the same page. There are four ways that I can think of. 1. Frameset. the sidebar menu is in a left frame and different content shows in the right frame after clicking links. This method is not recommended now. Framesets and frames are bad for SEO as search engines can't search the content in the frames. 2. iFrame. The sidebar menu is on the left and an iframe on the right has content that changes as links are clicked on the left. Same problem with SEO. 3. PHP. You can get PHP to show different content in a div from links in a sidebar. Here's an example of a News Box which is small but it could be all the rest of the page except for the sidebar:- http://www.wickham43.net/showform.php#phpnewsbox It's a bit complicated and again, search engines would probably only see and list the content of the first item in the box, not any others from clicked links. 4. PHP "includes". This is the method most people adopt which does not keep everything on the same page. It's the reverse, you have different pages for each of your main content items so each has its own url and can be searched. The left sidebar is coded in a separate "include" file (so you only have one file to edit if something changes) and then inserted into each page with PHP code <?php include ("menu.inc"); ?> See http://www.wickham43.net/serversideincludes.shtml Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.