Forum Moderators: open

Message Too Old, No Replies

DW help needed regarding editable regions in <head> of template.

         

lceg

4:32 pm on Jan 7, 2005 (gmt 0)



Hi,

I have created a template in DreamWeaver MX6.1 that consists of a non-WYSIWYG editable region in the <HEAD> tag which is then linked to a line of code in the body. I am trying to create a template which incorporates an I-frame into the page, but where the loading file for the I-frame is different for each child file attached to the template.

This is the code for the Iframe in the template...

1)initial coding within the HEAD tags (supposed to be the editable bit):
<!-- TemplateBeginEditable name="Head" --><!-- TemplateEndEditable --><!-- TemplateParam name="Iframe" type="URL" value="http://filetobeloadedintotheIframe.html" -->

2) where the actual Iframe is (non-editable) within the BODY tags:
<TD COLSPAN=4 valign="top"><iframe src="@@(_document['Iframe'])@@" align="center" width="650" height="303" frameborder="0" name="frame" scrolling="auto"></iframe></TD>

I tried to nest the "TemplateParam" stuff above (in the coding between the <head> tags) between the "TemplateBegin/EndEditable" tags but DW bleeped and gave an error message stating that TemplateParam tags cannot be placed inside any Template tags when I tried to save the template document. Why did that happen?
Is the Iframe coding editable or non-editable if it has TemplateParam tags but not TemplateBegin/EndEditable tags? DW colour-codes it as an editable region (where the line of editable code is shown as green text in MX), so I thought it was editable, especially as I was actually able to change the Iframe URL for each file with the template attached.

Also, when changing a non-editable feature (e.g. background colour) in the template and updating the pages I have found that in all the individual child files, the code specifying which URL to load into the Iframe has changed to the default URL that was originally only set in the template.
If the region in the child files is editable, surely it shouldn't be changed if I edit a non-editable region in the parent template? Is it to do with the fact that its coding thats not WRITTEN to the webpages but acts as a command (i.e. tells the browser where to link the iframe to)?
Maybe I have written the template coding for the Iframe wrong in the first place, which would explain all the confusion here!

I've been searching for a while for the solution for this problem but haven't found anything. Please help!

Lx