Skip navigation
Currently Being Moderated

DW CS5 modify template head anomaly

Nov 21, 2011 12:34 PM

Hi

 

I have an established site based on a single template with external css defined outside an editable region below the default editable region into which the page title can be inserted.

 

To override a CSS class on one page, I added the new style into the title editable region which is above the point where the external css gets included, but this does not result in the modified style being applied.

 

To overcome this, I added an additional editable region just above the </head> tag in the template expecting that it would propagate across the site when saved.

 

What actually happened was that the editable region relocated itself to just below the <head> section both in the template and the child pages - ie to after the </head> tag and before the <body> tag.  If I move the new editable region so it is no longer the final line before the </head> tag, then it works as expected.

 

This smells like a bug in CS5, but before I report it I thought I'd better check to see if this is a universal issue or just on my system.

 

Comments please.

 
Replies
  • Currently Being Moderated
    Nov 21, 2011 1:04 PM   in reply to akribie

    This smells like a bug in CS5, but before I report it I thought I'd better check to see if this is a universal issue or just on my system.

     

    More than likely it's a problem in your code.  We can't know what this is without seeing your page and its code.  Can you help with that?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 21, 2011 2:48 PM   in reply to akribie

    Try this again on that page.  I'm sure you were affected by cosmic rays or something .  There is absolutely nothing there that could cause something like this to happen.  And anyhow, DW doesn't ever move editable regions within the code.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 21, 2011 3:37 PM   in reply to akribie

    I'm definitely not able to reproduce your results in any version of DW back to DW2!

     

    And why are you feeling the need to insert another editable region in the head anyhow, in addition to the stock two that are always placed there?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 22, 2011 3:45 AM   in reply to akribie

    Why do you need this extra editable region anyhow?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 22, 2011 5:32 AM   in reply to akribie

    It had been my understanding that CSS within a page had higher priority than the same declaration in an external CSS file.

     

    That would only happen if the embedded CSS came AFTER the link to the external file.

     

    There is no restriction on where in the Template's head region you can (manually) insert an editable region (you cannot do it using DW's UI), as long as it's a legal location (and immediately before "</head>" is certainly legal).

     

    You could have just as easily moved the stylesheet link so that it occurred before the embedded stylesheet.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 2:18 PM   in reply to akribie

    I'm experiencing the same thing.  I need to make my meta tagging editable within each page to match the particular subject.  So I tried inputting an editable region right above the last line of the </head> and it automatically moved it to just after the <body> tag.  Of coure, my meta tags won't work there.

     

    However, I did notice that using an editable region farther up in the <head> section does allow me to put the meta tagging into the document I need it to go into.  So perhaps try higher up in the <head> section.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 2:48 PM   in reply to akribie

    Yes, I'm using Win 7 and have DW CS5. So that may be the case. Glad you found a solution.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 2:48 PM   in reply to akribie

    I am using both Mac and W7-64.  I can guarantee you that this is not a DW issue.  There is absolutely no difference between an editable region below the <head> tag or above the </head> tag as far as DW is concerned.  If the editable region is being moved, someone is doing it inadvertantly.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 3:51 PM   in reply to akribie

    I've been using DW since DW2, and have written the only book yet published on DW Templates and Library items.  Not only have I never observed something like this happen, but I have never seen anyone else describe it on these forums since the early 2000's.  I can confidently assure you that there would be no difference in how DW would handle any editable region on the page, much less in the head region only.  Really.

     

    If you can define a series of steps that will allow you/me to reproduce this effect, I'll be happy to take it to the development team.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 2, 2011 4:23 AM   in reply to akribie

    I wish you had posted this earlier in the thread.  It would have saved us (or perhaps me) lots of angst!

     

    I can certainly reproduce this error.  In legacy versions of DW, you could not use the UI to insert editable regions in the head of the document.  Somewhere along the line, this got changed, and those options became enabled, as they obviously are now.  However, no matter where in the head region you try to do that insertion, the editable region is ALWAYS moved to just below the <body> tag, obviously reflecting DW's thinking that you cannot do what you just tried to do!

     

    Apologies - I will report this to the dev team immediately.  The bottom line is this - if you want an editable region in the head of the document, you must insert it manually, not by using the UI.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 2, 2011 4:39 AM   in reply to akribie

    I found that it didn't matter where in the head you place the cursor, the editable region is always created below the body tag.  The easiest workaround in that case is to create the region and then move it to where you want it.

     

    This is just wrong.  Either the options should not be available when the insertion point is in the head (which is how it used to be) or the operation should produce the expected results.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 21, 2012 7:30 PM   in reply to akribie

    Akribie,

     

    Can you show me how the code should look when with your 'work around' so that I can make my head an editable region, the way that you made it work?  I've read this a hundred times and would just like to see an example of the code how you were able to make it work??  Pretty Please...

     

    I have a similar issue as I cannot make my head region editable either and am very frustrated.  I'm using DW cs5.5....

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 23, 2012 5:45 AM   in reply to akribie

    The easiest way is to insert the additional script or whatever into the editable region that is in the Head section by default - that

    designed to accept a page title.

     

    Although that will work, there is normally a second editable region inserted in the head of a template document called "head", i.e.,

     

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

    <!--TemplateEndEditable-->

     

    It's usually ideal for usages such as those described in this thread.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points