Highlighted

Library assets

Explorer ,
Oct 26, 2020

Copy link to clipboard

Copied

Hello. 

 

Does anyone use a library in the asset panel with the header and/or footer in it?  I do not like to change every single page when adding a new link. I would just have to change the library item when changes were needed and then all the other pages in the site would be updated.

The footer is just location adresses and hyperlinks.  I did read on the Adobe site that links "may" not work in a library item but it has on my test run.

 

I looked into templates but that doesn't seem to be the answer.

 

Any other ideas on how to change something in a footer or header and have it change all the pages on the site?  It is a large site that I am building.  Thanks.

 

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

You have 3 options.  I'll run them down in order of preference.

 

1. Server-side includes (SSIs) are by far the most flexible and efficient way to manage site wide elements such as header, navigation, footer, etc...  You edit one file & upload to server.  Best of all, SSIs do not require you to use DW.  All the magic happens on the server.  See link below.

https://alt-web.blogspot.com/2015/07/server-side-includes-with-php.html

 

2. DW proprietary Templates (DWT files) support site wide content. Then you add Template Editable Regions for content that changes from page-to-page.  The only caveat with Templates is that changes  must be populated to child pages in DW and you must upload every child page to your server each time.  Even on small (20 page) sites this gets tedious and time consuming. And Templates do become corrupted especially on sites that exceed 50 or so pages. For larger sites, you really need a dynamic (database) solution or SSIs above.

https://helpx.adobe.com/dreamweaver/user-guide.html/dreamweaver/using/dreamweaver-templates.ug.html

 

3. DW proprietary Library Items can only be inserted into the <body> tag of your document which is a severe limitation.  And the caveat is the same as DW Templates.  They only work in DW and you must upload all site pages to server each time you edit a Library Item.  And LIs are not a good choice for large sites as they are likely to become corrupted over time.

https://helpx.adobe.com/dreamweaver/user-guide.html/dreamweaver/using/library-items.ug.html

 

I NEVER use Library Items. 

I RARELY use Templates and only for client sites. 

I ALWAYS use Server-Side-Includes even on small sites.

 

Views

67

Likes

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

Library assets

Explorer ,
Oct 26, 2020

Copy link to clipboard

Copied

Hello. 

 

Does anyone use a library in the asset panel with the header and/or footer in it?  I do not like to change every single page when adding a new link. I would just have to change the library item when changes were needed and then all the other pages in the site would be updated.

The footer is just location adresses and hyperlinks.  I did read on the Adobe site that links "may" not work in a library item but it has on my test run.

 

I looked into templates but that doesn't seem to be the answer.

 

Any other ideas on how to change something in a footer or header and have it change all the pages on the site?  It is a large site that I am building.  Thanks.

 

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

You have 3 options.  I'll run them down in order of preference.

 

1. Server-side includes (SSIs) are by far the most flexible and efficient way to manage site wide elements such as header, navigation, footer, etc...  You edit one file & upload to server.  Best of all, SSIs do not require you to use DW.  All the magic happens on the server.  See link below.

https://alt-web.blogspot.com/2015/07/server-side-includes-with-php.html

 

2. DW proprietary Templates (DWT files) support site wide content. Then you add Template Editable Regions for content that changes from page-to-page.  The only caveat with Templates is that changes  must be populated to child pages in DW and you must upload every child page to your server each time.  Even on small (20 page) sites this gets tedious and time consuming. And Templates do become corrupted especially on sites that exceed 50 or so pages. For larger sites, you really need a dynamic (database) solution or SSIs above.

https://helpx.adobe.com/dreamweaver/user-guide.html/dreamweaver/using/dreamweaver-templates.ug.html

 

3. DW proprietary Library Items can only be inserted into the <body> tag of your document which is a severe limitation.  And the caveat is the same as DW Templates.  They only work in DW and you must upload all site pages to server each time you edit a Library Item.  And LIs are not a good choice for large sites as they are likely to become corrupted over time.

https://helpx.adobe.com/dreamweaver/user-guide.html/dreamweaver/using/library-items.ug.html

 

I NEVER use Library Items. 

I RARELY use Templates and only for client sites. 

I ALWAYS use Server-Side-Includes even on small sites.

 

Views

68

Likes

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
Oct 26, 2020 0
Adobe Community Professional ,
Oct 26, 2020

Copy link to clipboard

Copied

You could look to use a CMS or use includes using the server language that is supported on your server.  Because you say that this is a large site I would assume there is some sort of CMS backend to what you are developing and not just a large amount of HTML files.

Likes

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
Reply
Loading...
Oct 26, 2020 2
Adobe Community Professional ,
Oct 26, 2020

Copy link to clipboard

Copied

You have 3 options.  I'll run them down in order of preference.

 

1. Server-side includes (SSIs) are by far the most flexible and efficient way to manage site wide elements such as header, navigation, footer, etc...  You edit one file & upload to server.  Best of all, SSIs do not require you to use DW.  All the magic happens on the server.  See link below.

https://alt-web.blogspot.com/2015/07/server-side-includes-with-php.html

 

2. DW proprietary Templates (DWT files) support site wide content. Then you add Template Editable Regions for content that changes from page-to-page.  The only caveat with Templates is that changes  must be populated to child pages in DW and you must upload every child page to your server each time.  Even on small (20 page) sites this gets tedious and time consuming. And Templates do become corrupted especially on sites that exceed 50 or so pages. For larger sites, you really need a dynamic (database) solution or SSIs above.

https://helpx.adobe.com/dreamweaver/user-guide.html/dreamweaver/using/dreamweaver-templates.ug.html

 

3. DW proprietary Library Items can only be inserted into the <body> tag of your document which is a severe limitation.  And the caveat is the same as DW Templates.  They only work in DW and you must upload all site pages to server each time you edit a Library Item.  And LIs are not a good choice for large sites as they are likely to become corrupted over time.

https://helpx.adobe.com/dreamweaver/user-guide.html/dreamweaver/using/library-items.ug.html

 

I NEVER use Library Items. 

I RARELY use Templates and only for client sites. 

I ALWAYS use Server-Side-Includes even on small sites.

 

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

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
Reply
Loading...
Oct 26, 2020 1
NHG Web LATEST
Explorer ,
Oct 28, 2020

Copy link to clipboard

Copied

Hello.  Thank you all for your input.  I appreciate it. Nancy, I chose the server side includes for now.  

Likes

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
Reply
Loading...
Oct 28, 2020 0
LEGEND ,
Oct 26, 2020

Copy link to clipboard

Copied

Another option would be to use javascript -

 

Example:

1) Save the below in a file named navlinks.js

 

const navlinks = `
<ul>
<li><a href="page_one.html">Page One</a><li>
<li><a href="page_two.html">Page Two</a><li>
<li><a href="page_three.html">Page Three</a><li>
<li><a href="page_four.html">Page Four</a><li>
<li><a href="page_five.html">Page Five</a><li>
</ul>
`
const nav = document.querySelector('.nav');
nav.innerHTML = navlinks;

 

 

 

 

2) In the pages where you want to include the navigation designate a container where you want the navigation links to appear -

 

<nav class="nav"></nav>

 

 

 

3) Then in those pages link to the javascript file -

 

<script src="navlinks.js"></script>

 

 

Now all you need to do is make the changes in the navlinks.js file, those changes will propogate to any page where you have set up the above workflow.

 

However if you are using a server-side language to build your website then use 'server-side-includes' as has been mentioned in other responses.

Likes

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
Reply
Loading...
Oct 26, 2020 2
Adobe Community Professional ,
Oct 26, 2020

Copy link to clipboard

Copied

Yes, I forgot about JavaScript.  And even that would be preferrable to Library Items which really suck IMO. 

 

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

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
Reply
Loading...
Oct 26, 2020 1
LEGEND ,
Oct 26, 2020

Copy link to clipboard

Copied

I think a javascript option is an ok solution for small 'static' websites, which are only ever going to extend to a handful of pages, where a dynamic server-set up is not really required. It doesn't sound like it would be any good for the OP, unless they are trying to build their extensive website using multiple static html pages, which they shouldn't be.

 

Its an option, I throw it in some times. I have a few websites where I use it because the website is a small brochure style affair and I like to mix things up a bit to keep fresh but mainly I would use php includes, even for small websites, as it provides the option of quickly upgrading if needed.

 

I'd never now use dwt specific templates or library items. I recall using them in my early novice days of web-building and eventually they became a mess, for some reason, where often I would have to detach the page from the template to update it, making the template useless.

Likes

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
Reply
Loading...
Oct 26, 2020 0
Adobe Community Professional ,
Oct 27, 2020

Copy link to clipboard

Copied

the idea behind the use of templates and library elements specific to DW must be put into context.


At the time when DW proposed these two features, the goal was mainly to provide pure static HTML that would not require any server and/or client technology to make the content and structure of the pages dynamic. The major disadvantage was that each time a change or modification was made, either in the structure of the template or in the content of the library elements, all the affected pages had to be re-uploaded again.


Since then, and as proposed by Os or Nancy, many other client and/or server approaches have improved the dynamic content composition workflows. Moreover, today few people disable Javascript on their browsers, and servers no longer have the latency to rebuild pages and content, even the most complex, just before delivering them.


Well, anyway, I admit that I still feel the need to use constructions based on these two technologies proposed by DW to build applications. By the way, right now I'm producing a wepapp where, beside the use of other techs, a large part of the page content architecture and structure is based on a template (using variables and conditions)... well... I'm aware that this remains totally personal, and debatable...

Likes

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
Reply
Loading...
Oct 27, 2020 1
LEGEND ,
Oct 27, 2020

Copy link to clipboard

Copied

'Well, anyway, I admit that I still feel the need to use constructions based on these two technologies proposed by DW to build applications. By the way, right now I'm producing a wepapp where, beside the use of other techs, a large part of the page content architecture and structure is based on a template (using variables and conditions)... well... I'm aware that this remains totally personal, and debatable...'

 

Really, that surprises me that you would use the .dwt and library items in Dreamweaver. I thought you mainly used node.js where a more robust template engine workflow would be more suitable for including generic content into pages?

Likes

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
Reply
Loading...
Oct 27, 2020 1
Adobe Community Professional ,
Oct 27, 2020

Copy link to clipboard

Copied

you're right, I agree with you.
I would say that I often like to build an HTML framework in a traditional way. The interest of a web app is in one sense to take advantage of the browser's capabilities to offer the user a rich experience similar to that of an embedded application, but in another sense to allow users using an old browser to have a more traditional approach to websites.


With time and experience, I realized that nothing is better than an HTML page that is robust and stable, but above all humanly readable. And I admit that in many situations flattening in a tool like DW with its templates and library elements allows to reconcile dynamic structure and old fashioned construction. It is then all the more easy to rely on other technologies, such as Node, but not only, in order to enrich each of the application's functionalities


Well, not all projects lend themselves to it, but as soon as the occasion allows it, I like to get back to such tools. and then it gives me material to beta test Adobe solutions.

Likes

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
Reply
Loading...
Oct 27, 2020 1
Adobe Community Professional ,
Oct 27, 2020

Copy link to clipboard

Copied

  • Know your tools.
  • Choose wisely. 
  • Use whichever ones work best for the project at hand.

 

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

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
Reply
Loading...
Oct 27, 2020 1