Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 344
  • Last Modified:

Editable tag attributes

Just got back to DW after a long break and am now using DW MX 6.0 and just trying to get up to speed. One of the things that used to annoy the hell out of me before was the seeming inability (easily at any rate) of defining editable regions that could appear inside attributes. When i saw the phrase mentioned in my subject in the help files, i thought - progress at last. However, there certainly doesn't seem any easy way of populating my 'editable' attributes. Here's the item:


<!-- #BeginLibraryItem "/Library/order-table.lbi" --><!-- TemplateParam name="name" type="text" value="form1" --><!-- TemplateParam name="action" type="text" value="" --><!-- TemplateParam name="href" type="URL" value="javascript:alert('Not implemented yet')" -->

<form name="@@(name)@@" method="post" action="@@(action)@@">
  <table border="0" cellpadding="0" cellspacing="5">
    <!-- order elements -->
    <tr>
      <td height="25" class="button"><span class="buttonText"><a href="@@(href)@@">add
        to cart</a></span></td><td valign="center"> <input name="amount" type="text" id="amount" size="3" maxlength="5"></td><td class="caption"> how many?</td></tr>
  </table></form><!-- #EndLibraryItem -->

Indentation seems to be as i remember - lousy - is there any way to fix this.

The main thing though is: how do i get those attributes in there without going in and hacking at the source?
0
CEHJ
Asked:
CEHJ
  • 10
  • 9
1 Solution
 
Jason C. LevineNo oneCommented:
Hi CEHJ,

1) Just asking to be sure: Is this library item applied to a page with an existing template (you're using this as a nested template, right)?

2) I don't see the  <!-- InstanceBeginEditable name="EditRegionWhatever" --> and <!-- InstanceEndEditable --> in the above snippet which should be there for proper nested template syntax.  Here's the relevant technote:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16416

3) Indentation:  Looks like standard DW indentation to me, but because you mentioned MX 6, I know there is a known issue with code indentation:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16726

Does the above apply to you?  If not, they have improved the source code tools in DW 8, maybe it is time to upgrade...

0
 
CEHJAuthor Commented:
Well actually i was trying to use it as just a library item, but maybe those can't be parameterized?
0
 
Jason C. LevineNo oneCommented:
Nope.  I'm pretty sure you need to "templatize" is to get that functionality to work.  Try adding the editable region tags (#2) anyway and see if that fools DW into doing what you want...
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
CEHJAuthor Commented:
Well i probably shan't at the moment, since i'm now using the editable attributes in a straight template. But - and i can barely believe this is the case - suppose i have

<input type="hidden" name="a" value="x">
<input type="hidden" name="b" value="y">

am i right in thinking that DW 6.0 only allows me to parameterize *one* of those since the values have the same name(!)?
0
 
CEHJAuthor Commented:
>>since the values have the same name

IOW, the attributes have the same name
0
 
Jason C. LevineNo oneCommented:
Eh?

Why would this not work:

<input type="hidden" name="a" value="@@(x)@@">
<input type="hidden" name="b" value="@@(y)@@">

or

<input type="hidden" name="@@(a)@@" value="x">
<input type="hidden" name="@@(b)@@" value="y">

Where is the value the same?  Am I missing something?
0
 
CEHJAuthor Commented:
>>Where is the value the same?

The *name* of the attribute is the same. The world 'value' was misleading, but it *is* the name of the attribute in question
0
 
CEHJAuthor Commented:
>>Why would this not work:

I'm winding this q up now and would be grateful if you could confirm or refute my findings
0
 
Jason C. LevineNo oneCommented:
Sorry, I have some real-life issues to handle and haven't been able to test yet.  Can you give me one more day to set up a template of my own and test your theory?
0
 
CEHJAuthor Commented:
Yep. Just use the same <input> tags as i did if you would please
0
 
Jason C. LevineNo oneCommented:
From the original question or these:

<input type="hidden" name="a" value="x">
<input type="hidden" name="b" value="y">

Which element do you want me to templatize?
0
 
CEHJAuthor Commented:
That'll do. I'd like you to templatize *both* elements on the attribute 'value'
0
 
Jason C. LevineNo oneCommented:
Ok, I'll try it when I get home later tonight...
0
 
CEHJAuthor Commented:
Thanks
0
 
Jason C. LevineNo oneCommented:
Something like this?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --><!-- TemplateParam name="value" type="text" value="x" --><!-- TemplateParam name="value2" type="text" value="y" -->
</head>

<body>

<!-- TemplateBeginEditable name="EditRegion3" -->
<div>
<p>This is a test form:</p>

<p>Blah</p>
</div>
<!-- TemplateEndEditable -->
<form action="" method="post" name="form1" id="form1">
<input type="hidden" name="a" value="@@(value)@@">
<input type="hidden" name="b" value="@@(value2)@@">
</form>
</body>
</html>
0
 
CEHJAuthor Commented:
Well, does that work in the editor through the Modify menu?
0
 
Jason C. LevineNo oneCommented:
Yup.
0
 
Jason C. LevineNo oneCommented:
I should qualify that.  It works in the editor with DW 8.  YMMV.
0
 
CEHJAuthor Commented:
So sorry about the wait Jason - have increased the points. Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 10
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now