Skip navigation
Alykhan2
Currently Being Moderated

<!-- InstanceBegin template="" codeOutsideHTMLIsLocked="false" --> Problem

Aug 12, 2011 7:34 PM

Hi,

 

I'm trying to add the following line as the first line in my php file.

 

<?php session_start(); ?>

 

For some strange reason everytime I try and add that to my php files they get wiped out when I update the template.  I have the following code in my template.

 

<!DOCTYPE html>
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="false" -->

etc..

 

In my templates this is always the first line

<!-- InstanceBegin template="Templates/dashboard.dwt.php" codeOutsideHTMLIsLocked="false" -->

<?php  include("config.php");

?>
<!DOCTYPE html>
<head>

 

 

Why can't I add anything above and why is this the first line?

 
Replies
  • Currently Being Moderated
    Aug 13, 2011 4:21 AM   in reply to Alykhan2

    For some strange reason everytime I try and add that to my php files they get wiped out when I update the template.  I have the following code in my template.

     

    ...

     

    In my templates this is always the first line

    <!-- InstanceBegin template="Templates/dashboard.dwt.php" codeOutsideHTMLIsLocked="false" -->

    <?php  include("config.php");

    ?>
    <!DOCTYPE html>
    <head>

     

    First of all, the code you show above is not from a Template, it's from a child page.  Please confirm that you have taken it from your Template page, and whether you are in fact using nested Templates.

     

    Second, the code you are showing is completely borked.  It could never be like that without user 'intervention'.  It *should* be like this -

     

     

    <?php  include("config.php");

    ?>
    <!DOCTYPE html>

    <html>

    <!-- InstanceBegin template="Templates/dashboard.dwt.php" codeOutsideHTMLIsLocked="false" -->

    <head>

     

    Was that a typo? If not then we need to fix things.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 29, 2011 2:20 PM   in reply to MurraySummers

    This same issue has been bugging me for a long time. The exact same code comes from a brand new page,

    made from a brand new template. No, nothing is nested.

     

    In the template the page is based on, this line does not exist. However, when I make a new page from template, it appears. There is no user intervention or user altering of the code. The line is greyed out, so cannot be deleted. I am trying to simply write some html in the page, not any php.

     

    If you paste the line into Google, you will get dozens if not hundreds of results, mostly other people with this line in the code of their page. In other words, you will see their page and if you look at the source, it is there, at the top line. So I do not think it is isolated.

     

    Sometimes it prevents me from inserting anything (text, images etc.) into a page (that I was able to edit fine before). I get the message about 'nested editable regions' but nothing was done to alter the code produced by DW in making the template. It is frustrating and an answer would be appreciated.

     

    If anyone has a real solution to this problem, it would be most welcome.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 29, 2011 2:43 PM   in reply to mexicomapmaker

    If anyone has a real solution to this problem, it would be most welcome.

     

    That line only means something to DW.  It is the default value, and it is placed in EVERY template child page, which is why you find oodles of instances on Google.  It *should* be there.  It doesn't prevent you from adding anything to your page.

     

    But the code that you have shown in your previous posts is a bit confused.  Can you please show us the top 20 lines of code on your TEMPLATE page?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 29, 2011 4:30 PM   in reply to Alykhan2

    Just for grins take all of the conditional comments away from the space between the doctype and the <head> tag in the template page, and replace them with a simple <html> tag.  See what happens then.  I'm betting DW doesn't quite know what to do with that kind of content.

     
    |
    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