2009-07-15 5 views
1

リストの内容をレンダリングするためにXSLTを使用しているシンプルなDataFormWebPartがあります。しかし私は、次のようにtrueに評価されず、現在のユーザーに@Authorフィールドに各リスト項目を比較したい:XSLのヘッダ内の著者とSharePoint XSLTのユーザーIDを比較する

<xsl:param name="UserID" /> 

と評価されたテンプレート内行:私は@Authorと$ユーザーIDの両方の値を持つ

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

  • @Authorがああとしてレンダリングユーザープロファイルへのyperlink
  • $ UserIDは同じテキストとして表示されますが、ハイパーリンクは表示されません。

ユーザープロファイルの非ハイパーリンク値を取得するために使用できる式は何ですか?迅速な勝利が見つかり

+0

を参照する必要があり、あなたはどのような内容author'のと '$ユーザーID @'の例を投稿することができます'のように見える? –

+0

@Author = Last Name, First $ UserId = Last Name、First – bryanbcook

答えて

1

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

フォーマットが実際にどのように記述されているかは、これが近いほどです。 +1 – Tomalak

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> 

関連する問題