It is very easy to display list item attachments in
List View and also manipulate the display of attachment, like if attachment is
image, we can display image not just a link.
1. Open List View in SharePoint
Desinger
2. Add new column titled "Attachments".
3. Select TD tag of New column.
4. Replace selected code with below
code.
XSLT
CODE
|
<td
id="ItemAttchment" class="ms-vb">
<xsl:element name="SharePoint:AttachmentsField">
<xsl:attribute name="runat">server</xsl:attribute>
<xsl:attribute name="FieldName">Attachments</xsl:attribute>
<xsl:attribute name="ControlMode">Display</xsl:attribute>
<xsl:attribute name="Visible">true</xsl:attribute>
<xsl:attribute name="ItemId">
<xsl:value-of select="@ID"/>
</xsl:attribute>
</xsl:element>
</td>
|
5. View with Attachments
Thanks, worked perfect :) very happy with the result.
ReplyDeletemore then one attachment is not accessible?
ReplyDeletehow does this work in Sharepoint online??
ReplyDelete