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

Not recognizing editable regions

New Here ,
Jul 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

I'm trying to trouble shoot an issue with my template.  This is a project that isn't updated often, this issue I noticed when my Dreamweaver version was updated.  Since this project is not updated very often I can't say which version it worked in and which version caused it not to work.  I am currently using DW 18.0

When I open my template file, I am removing some outdated code.  When I save the .dwt file, I get "This template doesn't have any editable regions."  But there are in fact many editable regions.  Snippey it below of my template file. And also a file created from the template.

<!doctype html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- TemplateBeginEditable name="doctitle" -->

<title>my amazing site</title>

<!-- TemplateEndEditable -->

<link rel="icon" type="image/png" href="../htdocs/favicon.ico">

<!doctype html>

<html lang="en"><!-- InstanceBegin template="/Templates/basic-page.dwt" codeOutsideHTMLIsLocked="false" -->

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- InstanceBeginEditable name="doctitle" -->

<title>a page on my site</title>

<!-- InstanceEndEditable -->

<link rel="icon" type="image/png" href="favicon.ico">

Views

1.4K

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 27, 2018 Jul 27, 2018

Sorry, I changed this...

<!-- TemplateBeginEditable name="body-class" -->

<body class="home">

<!-- TemplateEndEditable -->

...to this...

<body class="home">

<!-- TemplateBeginEditable name="body-class" -->

<!-- TemplateEndEditable -->

I understand what you're going for, trying to make the body tag's class modifiable, but I'm pretty sure you can't do that with an Editable Region.

Votes

Translate

Translate
Community Expert ,
Jul 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

Where's the rest of the code?

The warning usually pertains to the editable regions in the body of the page. More of a "hey you goofball, you're forgotting to make it so you can change the content of the page" type of warning.

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 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

here the template file, i removed the script and link calls as they shouldn't be important.

<!doctype html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- TemplateBeginEditable name="doctitle" -->

<title>the site</title>

<!-- TemplateEndEditable -->

<link rel="icon" type="image/png" href="../htdocs/favicon.ico">

<!-- TemplateBeginEditable name="PerPageScriptBeforeContent" -->

<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="head" -->

<meta content=" " name="description">

<!-- TemplateEndEditable -->

</head>

<!-- TemplateBeginEditable name="body-class" -->

<body class="home">

<!-- TemplateEndEditable -->

<!-- Header -->

<!--#include virtual="/_includes/header.shtml"-->

<!-- End Header -->

<!--end navWrapper-->

<main>

  <div class="body-text has-sidenav">

    <div id="container">

    <div class="body">

      <div class="content" id="content">

        <!-- TemplateBeginEditable name="body" -->

        <!-- TemplateEndEditable -->

      </div>

    </div>

    </div>

  </div>

</main>

<!-- Footer -->

<!--#include virtual="/_includes/footer.shtml"-->

<!-- End Footer -->

<!-- TemplateBeginEditable name="PerPageScript" -->

<!-- TemplateEndEditable -->

</body>

</html>

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 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

I don't think you can split a tagset like <body></body> with template comments, that appears to be confusing DW.

When I modify only that, to place the entire editable region before or after the opening <body> the error goes away.

It's been a long time since I've used DW's Templates. I've totally given up on them in favor of using server side includes for my repeated areas instead. It's a lot less hassle than the often quirky .dwt files are.

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 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

I'm not quite understanding what you changed.  Did you change it to just one editable region? Can you send me your snippet? 

Our future thought was to move it our of DW templates, and replace it without our own template system we developed. But if I could get it working in the short term that would be helpful.

appreciate the quick help on this!

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 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

Sorry, I changed this...

<!-- TemplateBeginEditable name="body-class" -->

<body class="home">

<!-- TemplateEndEditable -->

...to this...

<body class="home">

<!-- TemplateBeginEditable name="body-class" -->

<!-- TemplateEndEditable -->

I understand what you're going for, trying to make the body tag's class modifiable, but I'm pretty sure you can't do that with an Editable Region.

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 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

Thanks!!  Back to working again.  This used to work in an older version, but happy to have a solution in place for now. 

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 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

I went back and did some digging, you can make the class in the <body> tag editable, but not with an Editable Region. To do it, you need to use the Make Attribute Editable function...

1. Click on the body tag
2. Choose Tools > Templates > Make Attribute Editable
3. In the dialogue that appears, verify it is asking you to set attributes for the BODY tag

4. Check the "Make attribute editable" box

5. Verify Label is set to "class"
6. Verify Type is set to "Text"
7. Add a Default setting (like "home")
8. To edit the attribute on a child page, open it and go to Edit > Template Properties
9. Select the "body" from the list
10. Set the new class in place of the default text

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 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

LATEST

yes, I have used these a while back and forgot out them.  added them and working!  Thanks for your extra effort on this.

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