Created
September 17, 2015 22:47
-
-
Save BillCacy/0a81eef04b9099a3a311 to your computer and use it in GitHub Desktop.
This is the view used to render the search results.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model YOURNAMESPACE.ViewModels.Common.Components.Search.SearchResultsViewModel | |
<div class="container-fluid width-90"> | |
<div class="row"> | |
<h1>Search results for “@Model.SearchTerm”</h1> | |
@if (Model.SearchResults != null && Model.SearchResults.Any()) | |
{ | |
foreach (var result in Model.SearchResults) | |
{ | |
<div> | |
<a href="@result.PageLinkUrl" title="@result.Title"> | |
<h2 class="entry-title">@Html.Raw(result.Title)</h2> | |
</a> | |
<div class="entry-summary"> | |
@Html.Raw(result.Content) | |
<a href="@result.PageLinkUrl" title="@result.Title">...Continue reading<span class="meta-nav">→</span></a> | |
</div> | |
</div> | |
} | |
} | |
else | |
{ | |
<p>No results matched the search criteria “@Model.SearchTerm”</p> | |
} | |
<div class="row"> | |
<div class="pager"> | |
@Html.Partial(Model.PagingViewPath, Model) | |
</div> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment