Kentico - Content Only page & smart search result

James Bennett asked on December 5, 2018 07:11

I have a custom page types (Content Only) for Locations. Then I have a landing page (/company/locations/) with repeater to list all locations and their details. Things work well so far. Now, after adding the smart search, I notice that if I search a location name like "san francisco", the landing page didn't show up search result in official website, but the content-only page showed with a URL like this /company/locations/san-francisco. The thing is, this URL results in 404 since that page doesn't really exist. What should I do? Should I re-create the page type and change it to a regular page instead of content only before it's too late? Or is there a way to make individual location url (/company/locations/san-francisco) work - considering we can't specify a page template to go with content only page type? Thanks!

Recent Answers


David te Kloese answered on December 6, 2018 14:57

A few options:

1

  • remove your content only type from indexing.
  • Create a page crawler index so your dynamic content can be indexed

2

  • Add some extra logic in the search results transformation that checks if it's of your content only location type and render the path differently (could be custom macro)

3

Create a custom index which allows you to index what ever you want with any property you need. So you can let the index happen with the correct end URL.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.