ez Search examine price Range Valuessold [email protected] stcsold stc
Hi,
I am building a property site with search functionality, I have a parent node 'Property Portfolio' with childs nodes 'properties', the child nodes have been populated using the CMS Import tool which is essentially grabbing an xml feed and mapping the values to the relevant document property values and this is working fine.
However I need to search on these properties and have started with the ez search plugin as this does most of what I need however I also need to search on a price range i.e minPrice to maxPrice and this is where I am struggling any advise appricaited.
Heres what I have so far:
@using System.Globalization
@using System.Text
@using System.Text.RegularExpressions
@using Examine
@using Umbraco.Core.Logging
@using Umbraco.Web.Models
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
var statusTypes = new List
@foreach (var result in model.PagedResults)
{
switch (result.Fields["__IndexType"])
{
case UmbracoExamine.IndexTypes.Content:
var contentItem = Umbraco.TypedContent(result.Fields["id"]);
@RenderContentResult(model, contentItem)
break;
case UmbracoExamine.IndexTypes.Media:
var mediaItem = Umbraco.TypedMedia(result.Fields["id"]);
@RenderMediaResult(model, mediaItem)
break;
}
}
ez Search examine price Range Valuessold [email protected] stcsold stc
Hi,
I am building a property site with search functionality, I have a parent node 'Property Portfolio' with childs nodes 'properties', the child nodes have been populated using the CMS Import tool which is essentially grabbing an xml feed and mapping the values to the relevant document property values and this is working fine.
However I need to search on these properties and have started with the ez search plugin as this does most of what I need however I also need to search on a price range i.e minPrice to maxPrice and this is where I am struggling any advise appricaited.
Heres what I have so far:
@using System.Globalization @using System.Text @using System.Text.RegularExpressions @using Examine @using Umbraco.Core.Logging @using Umbraco.Web.Models @inherits Umbraco.Web.Macros.PartialViewMacroPage @{ var statusTypes = new List
}
@helper RenderSummary(SearchViewModel model) {
@FormatHtml(GetDictionaryValue("[ezSearch] Summary", "Your search for \"{0}\" matched {1} page(s)."), model.SearchTerm, model.TotalResults)
@helper RenderResultsRange(SearchViewModel model) { var startRecord = ((model.CurrentPage - 1) * model.PageSize) + 1; var endRecord = Math.Min(model.TotalResults, (startRecord - 1) + model.PageSize);
}
@helper RenderResults(SearchViewModel model) {
@helper RenderContentResult(SearchViewModel model, IPublishedContent result) {
@result.Name
We are delighted to offer for sale this immaculately presented and imaginatively extended attractive
}
Managed to get this resolved by implementing the below:
is working on a reply...