Reputation: 1256
I've created a custom page type with a transformation which results in an accordion. I have Smart Search set to index this page type, and i see the results. Is it possible to have the result link be the page that holds the webpart, rather than the page type?
In this case, there isn't any individual pages for the the user to browse.
I tried a search index set as Pages Crawler but that didn't seem to work, at least not when i test in the Search Preview.
Upvotes: 0
Views: 277
Reputation: 756
Does your tree look like this:
And you want the search results to be the Menu Item, but it's showing Custom Page?
If so, you need to have your search index be for the MenuItem, not the custom page. If you need it to be the custom page, you can always create a custom search index and set the URL to it's parent page. Custom Index Documentation
Upvotes: 0
Reputation: 1437
The custom page type you have wouldn't really have knowledge of what other pages reference it. Page crawler will allow the page that has the accordion to have it's accordion content indexed, so that should work, but you need to scan the page with the accordion with the page crawler, not the custom page type that is being used to generate the accordion.
If you can establish a relationship between the custom page type and what parent references, then you can always write a custom indexer and add some special logic for that particular page type (set the search url to something else for those page types), but again you need some linking logic.
Upvotes: 2