Skip to main content
Participant
June 12, 2017
Answered

Navigation housed in separate page?

  • June 12, 2017
  • 1 reply
  • 615 views

Is it possible to house the navigation in a separated page which then gets pulled into each page in Dreamweaver.

Or am I forced to go thru the entire website adjusting the NAV on each page?

Muse has a nice function for housing the HEADER and FOOTER in a separated page, where you then just adjust in one place and it's reflected across the site.

Thanks,

Alldaron

This topic has been closed for replies.
Correct answer Nancy OShea

My advice is to build all your pages with a .php extension.  It will give you more freedom to add other PHP code as your site grows.

To answer your question about using PHP includes in ordinary .html pages, it varies by hosting provider. 

Alt-Web Design & Publishing: Server-Side Includes with PHP

Many shared hosting plans do not allow it because it makes the server slower for everyone on your shared server.   However if you're on VPS or dedicated hosting, you may be able to do it by adding some code to your .htaccess file if you have one,  or by creating an .htaccess file in your server's root folder.   See the link above for details on how to do that.

Nancy

1 reply

BenPleysier
Community Expert
Community Expert
June 12, 2017

The method that is incorporated within Dreamweaver cand be found here How to design web pages based on Dreamweaver templates and How to create Dreamweaver template

My preferred method is to use PHP includes as described here PHP 5 include and require. For this to work, your server needs to have PHP enabled.

Also have a look at HTML includes at How To Include HTML

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
AlldaronAuthor
Participant
June 12, 2017

Thank you for the help. Server has PHP.

To clarify general structure, would I need to create .php pages for the housed content or can this be run off .html pages; while using the "php include" code?

thanks,

Alldaron

AlldaronAuthor
Participant
June 12, 2017

ps... using the

<div class="menu">

<?php include 'menu.php';?>

</div>

function