Copy link to clipboard
Copied
I have a Dreamweaver template with a code error that I have corrected repeatedly, and then saved, and every time I open it again the error is back. I have quit the program and restarted, rebooted my entire computer, recreated the site cache, and pretty much anything else I can think of.
This is super annoying, since I have to manually correct all new pages created by that template, and then repeatedly ALL 71 PAGES by hand, each time I update the template and it reverts the pages back.
I took a movie of the error, posted it to Youtube since I see no way to upload to the thread, but Adobe has stripped that, too. So here's a screen shot which will not show the problem happening at all and is next to useless.
Copy link to clipboard
Copied
Well, I guess they didn't actually strip the vid. My apologies, they said they were.
Copy link to clipboard
Copied
Answers are in your code, not video or screenshots.
Validate code in your Template.dwt file and fix all reported errors.
HTML: https://validator.w3.org/
CSS: https://jigsaw.w3.org/css-validator/
File > SaveAs Template to the your local site folder's Templates folder.
Site - mySite (C:\mySite)
- Templates
- myTemplate.dwt
Hope that helps. If not, post back. We'll need to see the code from your Template.
Copy link to clipboard
Copied
Sounds like a corrupted Template or it contains more errors than you realize.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I can't tell anything from code fragments in screenshots, sorry.
Please copy & paste the actual code from your Template into a web forum reply.
This is what a Template should look like. Valid code and Editable regsions for page specific content.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- TemplateBeginEditable name="doctitle" -->
<title>Unique, Page Specific Title</title>
<!-- TemplateEndEditable -->
<!--link to external CSS file-->
<link href="../css/my_styles.css" rel="stylesheet" type="text/css">
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
</head>
<body>
<header>Content for sitewide header goes here</header>
<!--Sitewide navigation-->
<nav>
<a href="http://example.com"
>Example.com</a>
<a href="http://example.com"
>Example.com</a>
<a href="http://example.com"
>Example.com</a>
<a href="http://example.com"
>Example.com</a>
</nav>
<!-- TemplateBeginEditable name="EditRegionArticle" -->
<article>Content for unique article goes here. Very important for search engines.
</article>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="EditRegionAside" -->
<aside>Content for unique aside Tag Goes Here</aside>
<!-- TemplateEndEditable -->
<!--Sitewide Footer-->
<footer>Content for sitewide footer Tag Goes Here</footer>
</body>
</html>
Copy link to clipboard
Copied
A closing paragraph tag is valid HTML, and the problem with a template refusing to save a change like that is not the resulot of bad code, particularly considering that the brand new template doesn't even update its own pages.
I can put anything I like between editiable regions, and it has never affected things before today. And if it's a coding issue then I need to ask when Dreamweaver began checking code against WC3 and refusing to update your page when it doesn't like it. I'm going to need to see the official update that such a thing has been added to Dreamweaver.
The problem is that the program is, and has been since CS6, nothing but buggy on Mac. This same template worked all week long just fine on Windows, and the other pages created from it are not missing the clossing P. Only the ones created today on my Mac did the issue crop up.
Copy link to clipboard
Copied
Until we see your Template, this is all just idle guess work.
I'm heading out now. I'll check back tomorrow.
Have a good night.
Copy link to clipboard
Copied
This does not help you with your problem, but I think that you should re-consider your options.
Dreamweaver Templates will only work when using Dreamweaver. If Dreamweaver is laid down to rest, your ability to maintain the site(s) goes with it.
There are a number of alternatives that you can consider.
My preference is to use NodeJS?Express.
Copy link to clipboard
Copied
I second the recommendation to avoid backed-in features like DW Templates and Library Items. There's too much dependance on the app itself to support features which may/may not exist in the future. In lieu of DW Templates, I use Server-Side Includes. A very simple technology that anyone can use. Best of all, it can be transported to any code editor.
PHP INCLUDES:
1. Drop menu block into a separate include file and SaveAs menu.html, i.e. includes/menu.html
2. Add a code snippet to the parent document's <body> tag, exactly where you want the menu to appear.
<?php require_once('includes/menu.html'); ?>
3. Repeat steps 2 on other pages.
4. Save documents as .php files.
5. Upload PHP files and includes folder to your server.
6. Repeat with other includes -- header, footer, forms, search bar, etc...
That's it in a nutshell.