0

I'm trying to display the managed path a site is on in my search results.

To be more clear: I have setup a core results webpart which fires a custom query to retrieve all site collections within a certain search scope. These are in a webapplication which has a couple of managed paths (wildcard) setup, which somewhat classify the site (apps, teams, etc.). To enhance the search results webpart, I'd like to show this 'category' to the user.

I have the URL property / variable available in XSLT, but that contains the entire site URL. That means I'll have to parse that and get the sitename. With C# or a regex I'd be able to, but in XSLT it seems not that straightforward.

Or I could add a column to the search results which holds the managed path, but I'm unsure wether that column is at all available. Is there a good reference which colums can be added?

2 Answers 2

0

The managed path is not exposed in a Managed Property or Crawled Property.

I would go down the xslt route - thats the approach that should work everywhere.

1
  • That's the only solution I found. I don't really like those kind of solutions completely depending on how a string is formatted, but there's no real choice here I guess. Thanks.
    – Jasper
    Commented Apr 16, 2013 at 6:47
-1

You have a Managed Property called "SiteTitle" that you can use to get the site's name. You need to add this Managed Property to Search Core results web part by adding the name <column name="SiteTitle"/> to the "fetched Properties" xml located in the editor part configurations under "Display Properties". After adding the Managed Property you can use in your xsl.

Hope it helps.

1
  • No it doesn't, please read before you post. You're not answering the question.
    – Jasper
    Commented Apr 3, 2013 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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