7 Replies Latest reply on Sep 4, 2007 1:29 PM by invid23

    Editable Regions in ASPX Without Templates

    invid23
      I have an .aspx c# page that I simply want to add editable regions to. I am using masterpages so I don't want to have to create a Dreamweaver template etc. But when I add the regions and navigate to the page in Contribute, and click enter, I am able to edit ANY portion of the page I want. Even slipping text in after all my aspx blocks etc which completely breaks my aspx page.

      Isn't there a way to allow users to ONLY edit within the edit tags, even though you are not using Dreamweaver templates? Could this be a Masterpage/Contentpage issue?

      If the latter is the case, is there a way to report this as a bug?
        • 1. Re: Editable Regions in ASPX Without Templates
          Trenthalo
          I am also having the exact same problem, and would like to lock down my page without using dreamweaver.

          Any help would be greatly appreciated.
          • 2. Re: Editable Regions in ASPX Without Templates
            arfore
            The text that a Dreamweaver template uses to handle editable regions is:

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

            The methodology behind Dreamweaver templates is "Deny All, Allow Some", meaning that by default everything in a Dreamweaver template is locked then you explicitly allow editing of certain regions.

            Just make sure that the value of the name attribute in the above tag is unique to each editable region.
            • 3. Re: Editable Regions in ASPX Without Templates
              invid23 Level 1
              I am using that syntax - could the trouble be that I am using Masterpages in .net? This is the complete code in my test page:


              <%@ Page Language="C#" MasterPageFile="~/Templates/SubPage.master" AutoEventWireup="true" CodeFile="`ContributeTest.aspx.cs" Inherits="_ContributeTest" Title="Contribute Test Page" Theme="Default" %>

              <asp:Content ID="phSubTitle" ContentPlaceHolderID="phSubTitle" Runat="Server">
              Contribute Test Page
              </asp:Content>
              <asp:Content ID="phMain" ContentPlaceHolderID="phMain" Runat="Server">

              This is a test, edit:

              <!-- TemplateBeginEditable name="edtMain" -->testing...<!-- TemplateEndEditable -->

              </asp:Content>
              • 4. Re: Editable Regions in ASPX Without Templates
                arfore Level 1
                If I am not mistaken you also have to have a line near the top like the following:

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

                But I have never tried doing this completely by hand when there is no actual Dreamweaver template file involved. This line tells Contribute (or Dreamweaver) that the file uses the editable region stuff.
                • 5. Re: Editable Regions in ASPX Without Templates
                  invid23 Level 1
                  Thanks for the suggestion! I tried adding that tag, but it didn't work. I tried connecting it to a template also (without doing so through dreamweaver - I don't want the template to overwrite my code), still no good.

                  Shouldn't Contribute work without the necessity of using Dreamweaver? Especially when it is supposed to be compatible with .NET pages etc.?

                  I may need to try a more direct contact with Adobe oslt. See if there is an 'official' word on this issue.
                  • 6. Editable Regions in ASPX Without Templates
                    Web_Monkey
                    I ran into the same problem.
                    Dreamweaver can't edit between the <asp:Content> ... </asp:Content> tags in design mode, (but Contribute can).
                    To solve this just insert <%-- </asp:Content> --%> after the content tag, see example below.

                    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
                    <%-- </asp:Content> --%>
                    <!-- TemplateBeginEditable name="Main_Page_Template" -->

                    ...your code goes here...

                    <!-- TemplateEndEditable -->
                    </asp:Content>
                    • 7. Re: Editable Regions in ASPX Without Templates
                      invid23 Level 1
                      I have tried the <%-- </asp:Content> --%> trick, but it is acting exactly as it was before - allowing me to edit ANYTHING within the page.