FREE Gambling Affiliate Tips - Join Our Newsletter -

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.


+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Jan 2005
    Location
    MI
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    8

    Default 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
    Reply With Quote
  2. #2
    Member Engineer's Avatar
    Join Date
    Nov 2004
    Posts
    2,644
    Thanks
    880
    Thanked 597 Times in 319 Posts
    Rep Power
    10

    Default

    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:

    Code:

    Main Title

    Welcome to my webpage!

    Menu Item 1 Menu Item 2 Menu Item 3 Menu Item 4

    Thanks for visiting.

    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.

    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.

    Code:

    Menu Item 1 Menu Item 2 Menu Item 3 Menu Item 4

    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:
     
    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.

    After you've inserted the "php include," your new page with the new code would look like this:

    Code:

    Main Title

    Welcome to my webpage!

    Thanks for visiting.

    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".

    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!
    Reply With Quote
+ Reply to Thread
Similar Threads
  1. Link Exchange question
    By gravity in forum Casino Link Exchange
    Replies: 0
    Last Post: 12-29-2004, 11:57 PM
  2. Pop-up add question
    By AceKicker in forum General Discussion
    Replies: 3
    Last Post: 12-19-2004, 02:25 AM
  3. Question about casino affiliates
    By gravity in forum General Discussion
    Replies: 13
    Last Post: 12-16-2004, 11:13 AM
  4. Replies: 1
    Last Post: 12-05-2004, 10:02 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •