您的位置:首页 > 其它

如何在SharePoint Blog中显示附件(Attachement file)

2010-05-13 16:07 465 查看
参考了一个博客(http://www.pampigt.se/?p=69),其中自己也下了不少功夫,主要是对SharePoint Designer中Data view的使用方法不熟悉,走了些弯路,但终于还是搞定了。贡献给大家,应该也算是个原创吧。

1. 在NewPost画面增加Attach File按钮。

修改文件:C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\SiteTemplates\Blog\Lists\Posts\schema.xml。
将以下内容

代码

<xsl:when test="@Attachments=''"></xsl:when>
<xsl:otherwise>Attachments:
<xsl:if test="not (@Attachments=0)">
<xsl:element name="SharePoint:AttachmentsField">
<xsl:attribute name="runat">server</xsl:attribute>
<xsl:attribute name="ListId">{AC915FEE-C3BE-4102-8D84-75A384A327A2}</xsl:attribute>
<xsl:attribute name="FieldName">Attachments</xsl:attribute>
<xsl:attribute name="ControlMode">Display</xsl:attribute>
<xsl:attribute name="Visible">true</xsl:attribute>
</xsl:element>
</xsl:if>
</xsl:otherwise>

注意:ListId要替换为自己网站内的ListId。

保存Post.aspx。

至此,大功告成。重新在IE下打开Post.aspx,将会看到原来附件图标不见了,取而代之的是附件的链接。有多个附件时,将以多行显示。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: