开发者

Document Library Name in xsl

开发者 https://www.devze.com 2023-01-06 19:30 出处:网络
I need to grab the document library name in a webpartpag开发者_JS百科es:dataformwebpart I see the document library names in several places. Which one should I grab?

I need to grab the document library name in a webpartpag开发者_JS百科es:dataformwebpart

I see the document library names in several places. Which one should I grab?

HeaderTitle="DocLib_23" DetailLink="/sites/SiteCollection/Project_ABC/SubSite1/DocLib_23/Forms/AllItems.aspx" Title="DocLib_23"

How do I create a param in xsl to grab the doc lib name from any one of the above?

i.e. Title or HeaderTitle


  1. Some good Links.

http://msdn.microsoft.com/en-us/library/dd583143(office.11).aspx

  1. Add these two line

<xsl:variable name="DocLibName" select="substring-before(substring-after($PageUrl, '/Forms/'), '/')" />

<xsl:param name="PageUrl"/>

  1. set VIEWFLAG=1 (it should be in the properties windows)

  2. Find this line and modify if you want Filter the webpart list

<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" />

Change it to following

<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[(@CustomerNo=$DocLibName)]"/>

You can use this to display

<xsl:value-of select="$DocLibName"> <br/>

<xsl:value-of select="$PageUrl"/><br/>

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号