• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Sharepoint XSL formatting question

Hello!

I'm having issues formatting some XSL code and I was hoping someone could help. I'm customizing the People Search Results on Sharepoint and I want to replace the default results link (which references a GUID linked to the user's profile) with a link that uses the account name instead. Here is the code snippet I'm trying to use to do that:

<xsl:variable name="accountname" select="accountname"/>
<xsl:variable name="url">http://serverurl/person.aspx?accountname={$accountname}</xsl:variable>

However, when I look at the returned link on the search results page, it is literally the following link (the account name is not being substituted in the brackets):

http://serverurl/person.aspx?accountname={$accountname}

I also tried replacing the second line with the following but the web part errors out completely when I do it:

<xsl:variable name="url" select="{concat('http://serverurl/person.aspx?accountname=',$accountname)}" />

I know this has to be something simple that I am overlooking and what is surprising is that this seems to be a fairly common request but I haven't found a completely working XSL code snippet. Any ideas? accountname is definitely returned in the query's XML results, so I know the value is there.

Thanks
 
Last edited:
Back
Top