user883836
user883836

Reputation:

Dreamweaver CS3 - auto closing custom tags - unable to stop

I have inherited some PHP code which creates custom tags thus:

<group_description<?php echo $result['products_id'];?> style="display:none">
     ++some text here++
  </group_description<?php echo $result['products_id'];?>>

So this generates something like:

<group_description11 style="display:none">
     ++some text here++
  </group_description11>

Problem is that Dreamweaver CS3 will (when opening the php document - it's not on save - only if you close then reopen) will rewrite the last line to:

</group_description><?php echo $result['products_id'];?>>

so the resulting HTML output becomes:

</group_description>11>

I have all code rewriting OFF in DW and work only in code view - I can find nothing anywhere on this - has anybody any suggestions?

Baffled - Graeme

Upvotes: 1

Views: 937

Answers (1)

Eric LaForce
Eric LaForce

Reputation: 2151

Not sure if you are willing to lose all auto close functionality, but you could turn off the feature. The following link says

Note: By default, Dreamweaver determines when a closing tag is needed and inserts if automatically. You can change this default behavior so that Dreamweaver inserts a closing tag after you type the final angle bracket (>) of the opening tag. Alternatively, the default behavior can be to insert no closing tag at all. Select Edit > Preferences > Code Hints, and then select one of the Close Tags options.

Potentially changing the behavior to insert a closing tag after you type the final angle bracket would resolve this issue as well and you would not lose all auto close functionality

Hope this helps

Upvotes: 1

Related Questions