Updating library items inserts spurious HTML


hi all,

 

i have been using library items store snippets of code shared across multiple templates in site.  works updating things shared across multiple templates, google analytics code or page footers.

 

however, whenever make change 1 of various library items, dw (i'm using cs5) inserts spurious code templates using item.

 

for example, if have library item containing:

 

     <tr>

          <td>

               <p> stuff here </p>

          </td<

     </tr>

 

and insert @ indicated spot in following page:

 

     <table>

          <tr></tr>

          <tr></tr>

          <!--  insert library item here -->

     </table>

 

then instead of getting:

 

     <table>

          <tr></tr>

          <tr></tr>

          <tr>

               <td>

                    <p> stuff here </p>

               </td>

          </tr>

     </table>

 

instead get:


<table>

     <tr></tr>

     <tr></tr>

</table>

<table>

     <tr>

          <td>

               <p> stuff here </p>

          </td>

     </tr>

</table>

 

so dw closing , reopening table tag instead of inserting new row in existing table.  horrible have fix every time edit library, because defeats purpose of having library @ all--i still have go in , edit every template fix munged code.

 

anybody have clue why it's doing this?  did see similar previous post hints @ having code inside library item doesn't belong inside enclosing tag, don't see inside library items dw view invalid inside table--they begin , end <tr> , </tr>, respectively. 

 

thanks ideas...

 

/mike

anybody have clue why it's doing this? 

 

you aren't going answer.  dw likes see code can stand alone in library items.  can tell resulting code it's trying hard fix regards invalid code.  in other words, won't work in library item -

 

<tr>

     <td>some stuff</td>

<tr>

 

but -

 

<table>

  <tr>

    <td>some stuff</td>

  </tr>

</table>

 

if want use code fragments, consider changing server-side includes instead of library items.  more flexible , convenient use.



More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

How to decompile jsxbin to jsx

Gavik Photoslide GK2: Not able to upload photos - Joomla! Forum - community, help and support

Phoca Guestbook logger registret bruger af - Joomla! Forum - community, help and support