DocPublisher‎ > ‎3. How to‎ > ‎

How to change the appearance of additional attachments list


Description:

By default, attachments list in topic header or footer is separated by "|" character. Can this be changed?
 

Solution:

Here is a sample HTML for topic header (or footer), that will display the attachments list vertically, separated by new line. Also, this code will hide the containing table in case there is no attachments on corresponding document.

<table id="tableSwAddAtt" width="150" border="0" cellpadding="2" cellspacing="0">

 <tr>

  <td align="center">

   <span>Document Attachements:</span>

  </td>

 </tr>

 <tr>

  <td align="left">

   <SPAN id="spanSwAddAtt"><SW:ATTACHMENTS></SPAN>

  </td>

 </tr>

</table>

<script language="javascript" type="text/javascript">

var spanSwAddAtt = document.getElementById("spanSwAddAtt");

if(spanSwAddAtt.innerHTML == "")

{

 document.getElementById("tableSwAddAtt").style.display = "none";

}

else

{

 spanSwAddAtt.innerHTML = spanSwAddAtt.innerHTML.replace(/\|/g, '<BR>');

}

</script>




Comments