Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8015305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:12:58+00:00 2026-06-04T20:12:58+00:00

This is my very first attempt at dealing with XSL, so please be kind

  • 0

This is my very first attempt at dealing with XSL, so please be kind 🙂

I am modifying the SharePoint 2010 peoplesearch results page – specifically the “View in Organizational Browser” line. I have added the orgbrowser webpart to our main site and don’t want to direct users to the mysite for this link.

Here is the modified code:

<a id="{concat($currentId, '_OrgBrowserLink')}" href="/search/pages/orgbrowser.aspx?accountname={string(accountname)}">&#187; <xsl:value-of select="$ViewHiearchyLabel" /></a>

The above code works fine. I find I am having problems adding the search results querystring parameter though. The parameter is “k”.

  • I find I cannot append the “&” symbol (due to it being a special reserved character most likely). I have tried “%26” but that seems to mess up the accountname parameter before it (I receive a ‘user not found’ correlation ID error)

  • I cannot seem to grab the querystring parameter “k” with my limited knowledge of how xsl works. Could someone enlighten me?

Thanks all

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:13:00+00:00Added an answer on June 4, 2026 at 8:13 pm

    Unfortunately, the People Search Results web part does not pass the current url as a parameter. It does, however, pass several other URL parameters that do contain the current query string. So the solution is to use one of those, parse out the value in the ‘k’ parameter and append it to the URL.

    I used the $NameSortUrl XSL parameter.

    I parsed out the value of the ‘k’ parameter by using the substring-before and substring-after functions and saving the value in a variable:

    <xsl:variable name="kVal" select="substring-before(substring-after($NameSortUrl, 'k='), '&amp;')"/>
    

    I then appended this value to the url like this:

    <a id="{concat($currentId, '_OrgBrowserLink')}" href="/search/pages/orgbrowser.aspx?accountname={string(accountname)}&amp;k={$kVal}">
    

    Note the use of HTML encoding to get the ampersand in the url (&).

    Hopefully this is useful to someone else in the future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my very first question on Stackoverflow, so please bear with me if
This is my very first attempt at generating images on the fly. I want
This is my very first attempt at including ads in my app. I have
I'm new here, and this is my very first post. I have a very
I'm going a little mad I think. This is the VERY first thing I
So this was one of my very first questions here, but I have a
I got this error when I ran my very first spring example code. It
I've been seeing this instruction as the very first line of numerous CSS files
I am trying to write my very first python script. This was working but
This is very basic magento question i guess. I want to first get all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.