• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Dreamweaver CC, creating a navigation bar template

New Here ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

I've built a simple HTML site in Dreamweaver CC and it has grown considerably over time. With each new page, I have to go through and manually update the navigation bar on every page to account for the new link. I have attempted to do this using find and replace but it is not as reliable as I would like and often creates unwanted results.

My question is, is there a way to retroactively convert the existing navigation bar to a template so that each time I make an update it propagates to every page on the site. I understand that I would have to "apply" the new navigation template to every existing page in order for them to be affected by any updates moving forward.

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 26, 2017 Jul 26, 2017

I would use a server side include, either .php. or .shtml, to write the menu to each page. Then, rather than making an update and uploading every page with a change (hopefully), you simply change the navigation include file and upload it.

PHP: PHP Tutorial - Include File

SHTML: Server Side Includes (SSI) Tutorial - Part 1

Basically, you would have 1 menu file that houses only the actual html needed to run the menu. Then you would place a tiny snip of code into your pages where you want that menu

...

Votes

Translate

Translate
Community Expert ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

I would use a server side include, either .php. or .shtml, to write the menu to each page. Then, rather than making an update and uploading every page with a change (hopefully), you simply change the navigation include file and upload it.

PHP: PHP Tutorial - Include File

SHTML: Server Side Includes (SSI) Tutorial - Part 1

Basically, you would have 1 menu file that houses only the actual html needed to run the menu. Then you would place a tiny snip of code into your pages where you want that menu included in your files. When the page is requested, the server adds that include file's contents to the page where you want it and gives the completed page to the viewer.


Updating only happens on the one include file. You upload that and everything that includes it changes automatically.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

Thank you very much for the quick and comprehensive reply. And I also appreciate the php tutorial links. They'll come in handy.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

No not easily.  Templates are a phase 1 site building step.  And if your site is sizable and still growing, Templates are not a good long-term solution.   Sites built with Templates should not exceed about 50 pages and some would argue they shouldn't exceed 20.  But that's another discussion. 

Server-side includes are the best way to handle common site elements like navigation, headers, footers, etc...  Open a file, edit, save, upload to server. Done.   Your entire site is updated by the server.

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

With Templates or Library Items, you have open the main template, edit, save changes and populate to child pages.  Check to ensure all child pages are populated correctly and then upload every child page to server.  Even on small sites, this takes a lot of extra time. 

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

LATEST

Thank you very much for the quick and helpful reply, I also appreciate the php tutorial link. I'll give it a read.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines