March 11, 2014

SharePoint: Web Part Title URL with Refinement QueryString parameter

Task

I wanted to point SharePoint Web Part Title URL to a search results page with prepopulated refinement values. It didn’t work, as in Web Part settings, whenever I tried to input a valid URL with refinement parameter, I got error.

Example URL with refinement QueryString that didn’t work:

/Pages/MyPage.aspx?r=owstaxIdMyCategory:"a6c4a141-1b0e-4a2e-a7f7-2479251e3505"

 

Solution

You need to encode the colon (:) with %3A, so Web Part Title URL field becomes

/Pages/MyPage.aspx?r=owstaxIdMyCategory%3A"a6c4a141-1b0e-4a2e-a7f7-2479251e3505".

No comments:

Post a Comment