Welcome to Casino Affiliate Programs! If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Thread: Dreamweaver Question
- 01-03-2005 09:44 AM #1Member
- Join Date
- Jan 2005
- Location
- MI
- Posts
- 77
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Rep Power
- 8
Dreamweaver Question
Hi all. I have a quick question for anyone that knows something about Dreamweaver. I used Dreamweaver to make my site (http://www.reviews4casinos.com). I have no training in Dreamweaver, and mistakingly didn't use any templates on my site. Instead, when I wanted to create a new page, I just used one of my previous pages, and changed the words. Well, now, whenever I want to make a change to the entire site, I have to go through and manually change every single page. It's not THAT bad right now because I only have to do it to maybe 20 or 25 pages, but soon it will just be to cumbersome to do that! Is there a way to make it so if I want to say, change my nav bar on ever page, I can change it once and it will change on all pages?
thank you in advance for any help you can give!!!
Heather
- 01-03-2005 10:57 AM #2
Hi Heather, welcome to CAP!
Yes, there is a way to do this. I don't use Dreamweaver, but I do make use of "php includes" to accomplish what you're talking about.
Say you have a page with some code that looks like this:
You can cut out the menu items and save them into a separate ".php" file. Then you insert a line of php code where those menu items used to be, and this code "includes" the php file containing the menu code. You insert this code into all of your pages where you have that menu. Whenever you change the menu file, it is reflected on all of the pages.Code:Main Title
Welcome to my webpage!
Menu Item 1 Menu Item 2 Menu Item 3 Menu Item 4
Thanks for visiting.
So, going back to the above example, your php file could be called "menu.php" (or anything you want to call it), and it would contain the following code.
Now on your original page, you should have a blank space where you removed the menu items. Next, you need to insert the following code where the menu code used to be. This is the code that "includes" the menu.php file:Code:Menu Item 1 Menu Item 2 Menu Item 3 Menu Item 4
You need to have it exactly as it appears above -- note the spaces, semicolons, question marks, etc. It has to be precise or it won't work. The filename can be whatever you want it to be -- it doesn't have to be "menu," but it does need the .php extention.Code:
After you've inserted the "php include," your new page with the new code would look like this:
One more thing -- your original page needs to be resaved with a .php extension for this to work. So if it was "page1.html" you should resave it as "page1.php".Code:Main Title
Welcome to my webpage!
Thanks for visiting.
I don't know if you will be able to see the your php includes in action with Dreamweaver. The only way I can know for sure if mine are working correctly is to upload everything to my server and view it online.
Good luck!
Similar Threads
-
Link Exchange question
By gravity in forum Casino Link ExchangeReplies: 0Last Post: 12-29-2004, 11:57 PM -
Pop-up add question
By AceKicker in forum General DiscussionReplies: 3Last Post: 12-19-2004, 02:25 AM -
Question about casino affiliates
By gravity in forum General DiscussionReplies: 13Last Post: 12-16-2004, 11:13 AM -
hello, i am new here and have a question about casinopays.com
By maryann in forum Newbie CornerReplies: 1Last Post: 12-05-2004, 10:02 AM

LinkBack URL
About LinkBacks
