2009-07-15 79 views
1

我有一个简单的DataFormWebPart,我使用XSLT呈现列表的内容。我想每个列表项比较@author领域当前用户,而下面将不计算为true:将作者与SharePoint中的用户标识进行比较XSLT

在XSL的头

<xsl:param name="UserID" /> 

和模板内的评估行:

<xsl:value-of select="@Author" /> 
<xsl:if test="@AuthorID = $UserID">(you)</xsl:if> 

我有值都@author和$用户名:

  • @author呈现为啊yperlink to their user-profile
  • $ UserID呈现为相同的文本,但没有超链接。

可以使用什么表达式来获取用户配置文件的非超链接值?

+0

你可以张贴的`什么内容的例子@ Author`和`$用户名“看起来像? – 2009-07-15 18:11:10

+0

@作者= Last Name, First $ UserId =姓氏,第一个 – bryanbcook 2009-07-15 18:30:31

回答

1

找到速赢:

<xsl:value-of select="contains(@Author,concat('&gt;',$UserID,'&lt;'))" /> 
1

应该是指

https://sharepoint.stackexchange.com/questions/21202/custom-form-does-not-display-created-by-value

<tr> 
<td valign="top" class="ms-formlabel"><nobr>Created by</nobr></td> 
<td valign="top" class="ms-formbody"> 
    <SharePoint:CreatedModifiedInfo ControlMode="Display" runat="server"> 
    <CustomTemplate> 
     <SharePoint:FormField FieldName="Author" runat="server" ControlMode="Display" DisableInputFieldLabel="true" /><br/> 
     <SharePoint:FieldValue FieldName="Modified" runat="server" ControlMode="Display" DisableInputFieldLabel="true"/> 
    </CustomTemplate> 
    </SharePoint:CreatedModifiedInfo> 
</td> 

相关问题