Interspire Product Knowledge Base

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Export to PDF

User Opinions (5 votes)

80% thumbs up 20% thumbs down

How would you rate this answer?



Thank you for rating this answer.

How do I make certain areas of the web page editable?

In WebEdit you can create 'Editable Regions' so that only the sections of the page that you want to edit can be changed. This can be very useful if you create a template that all of your pages are modeled off or you have other people login to update some of your pages.

Editable Regions can be specified by surrounding the sections of the web page that you would like to allow editing to like the following:

<!-- #BeginEditable "Comments" -->
EDITABLE CONTENT
<!-- #EndEditable -->

You can also use:

<!-- InstanceBeginEditable name="Comments" -->
EDITABLE CONTENT
<!-- InstanceEndEditable -->

Note that the comments field will create a tool tip with that comment for the end user when they place their mouse cursor over the editable region.
There is NO difference in either method above, so the choice is yours as to which comment types you would like to use.

The editable regions should be properly nested. Think of them as div elements. If you want to make a cell editable you'll have to make it like:

<table>
 <tr>
  <td>
<!-- #BeginEditable name="Comments" -->
EDITABLE CONTENT
<!-- #EndEditable -->
  </td>
 </tr>
</table>

Macromedia Dreamweaver(TM) Style Templates

Users familiar with Macromedia Dreamweaver, will notice that the above comment tags are consistent with the way Macromedia Dreamweaver creates its editable regions for files based on a Macromedia Dreamweaver Template. This allows you to create web pages based on Dreamweaver Templates which will be automatically editable within WebEdit NX with the same Editable Regions defined. Pages edited with WebEdit NX, can also be re-edited using Macromedia Dreamweaver, with all Editable Regions still intact.

Using SSI and PHP Include tags

Using SSI Tags and PHP Include Tags in WebEdit Professional are a breeze. A page that is using SSI and or PHP includes however, must be restricted. i.e. It must contain regions that are editable, and the SSI and or PHP include tags must be outside these editable regions. Once a file being edited contains an SSI or PHP include tag, the file being included WILL show up in the editor. However, upon saving the file, ONLY the Editable Regions will be saved back into the original file, maintaining your SSI and or PHP include tags.
Example of a page with SSI include tags and Editable Regions that can be maintained in WebEdit NX:

<!-- #include file="header.html" -->
<body>
<!-- #BeginEditable "Body can be edited" -->
Editable content
<!-- #EndEditable -->
</body>
<!-- #include file="footer.html" -->

The included file should NOT have editable regions.

Using Server Side Code in your pages

Similar to the SSI and PHP tags above, this requires that pages that contain server side code MUST contain editable regions and that the server side code is outside these editable regions. Once a file being edited contains server side code, the server side code WILL be parsed, and run. However, once the file is saved, only the Editable Regions will be saved back into the original file, maintaining your server side code.

<?php echo("Hello World"); ?>
<html>
<head>
</head>
<body>
<!-- #BeginEditable "Body can be edited" -->
Editable content
<!-- #EndEditable -->
<?php
echo("Hello again, world!");
?>
</body>
</html>

When you create your templates through Dreamweaver you need to first create a template file and once this is done you will need to create a page from that template. The base template will create template tags that are '
TemplateBeginEditable' which are not compatible with the editor.

When you create your template from this, Dreamweaver will convert these tags to ones that are used by the editor.


Related Articles

No related articles were found.

Attachments

No attachments were found.

Powered by Interspire Knowledge Manager - World's #1 Best Selling FAQ and Knowledge Base Software