I am in the midst of creating a Multi-input examine search which will take from 1 to 4 inputs, Generate a query and then return the results to the user.
Currently I have setup the view, controller and model for this but I am having issues on rendering out the results for the user. Originally I did this through taking the RenderModel and storing it as "searchModel" and then performing a return CurrentTemplate(searchModel);
As mentioned by Sebastiaan though - This is bad practice.
I have pasted my code below if anyone could help :)
P.S (Excuse the class names on the view! Re-using what we had styled for our Umbraco forms - form)
public partial class Search
{
public Search(IPublishedContent content)
: base(content)
{
SearchResults = new List<IPublishedContent>();
}
#region Non DocType Properties
public string Term { get; set; }
public IEnumerable<IPublishedContent> SearchResults { get; set; }
public Pager Pager { get; set; }
#endregion
}
Creating a Multi Input Examine Search
Hi All,
I am in the midst of creating a Multi-input examine search which will take from 1 to 4 inputs, Generate a query and then return the results to the user.
Currently I have setup the view, controller and model for this but I am having issues on rendering out the results for the user. Originally I did this through taking the RenderModel and storing it as "searchModel" and then performing a return CurrentTemplate(searchModel); As mentioned by Sebastiaan though - This is bad practice.
I have pasted my code below if anyone could help :)
P.S (Excuse the class names on the view! Re-using what we had styled for our Umbraco forms - form)
View:
Controller:
Model:
is working on a reply...