Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8901

Smart search and URL to show pages in MVC

$
0
0
Hello, I am working on the search interface of my MVC site and followed this documentation. It works fine but I would like to display clickable results to the end user. However, I don't know how to show the URL associated with each result.I tried to explore the Data property for each result item such as :@h3@Results for @@Model.Data.Query@@/h3@ foreach (SearchResultItem item in Model.Data.Items) { @div@ @a href=@~/@item.Data.GetValue(@DocumentNamePath@)@@ @strong@@item.Title@/strong@@/a@ @/div@ } But the DocumentNamePath and NodeAliasPath for example,represent only the position of the page in the tree and do not reflect my MVC URLs. Could the URL pattern of the page type be considered? Is there any other property I could use?Thank you for your helpSylvain

Viewing all articles
Browse latest Browse all 8901

Trending Articles