SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In a custom Xsl file, used in a ContentByQueryWebPart, I would like to display some user fields with the presence indicator.

If I put <xsl:value-of select="@Author"/>, I get only the display name of the user.

Is there a simple way to render the user with its presence?

[edit] A minimal, reproductible xsl is :

<xsl:template name="MyStyle"
    <xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
            <xsl:value-of select="@Author"/>
share|improve this question
up vote 1 down vote accepted

If you check the standard ItemStyle.xsl then there is a reference to CallPresenceStatusIconTemplate.

<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>

Give this a try? Or perhaps check out what it does and see if you can reproduce it?

Hmmm - looks like this might be legacy from 2007

If the @SipAddress attribute exists on the current row, it generates the appropriate markup to create a presence icon for Microsoft Office Outlook 2007 or Microsoft Office Communicator 2007

There is a really good walk through how get a presence icon with 2010 on Ben Prin's blog:

share|improve this answer
I've seen this template, but I don't know how to link it to my specific user field. – Steve B Mar 12 '13 at 11:21
Sorry for the long delay, I miss the SO notification. The link you provided helped me to solve my issue. thanks – Steve B Apr 15 '13 at 14:30
That is great news - well done! – Dave Paylor Apr 18 '13 at 11:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.