How can I access custom controller's results from view ?
Hi, I am making products listing page with filters. I made custom SurfaceController, where i pass filter parameters with <form>'s GET Method from view, filter items and here is the problem, how can i return filtered items back to view and how to access them in view? Here is SurfaceController Code :
public class OffersSurfaceController : SurfaceController
{
public ActionResult GetFilteredOffers(int ? offersTypeId)
{
IEnumerable<IPublishedContent> allOffers = Umbraco.Content(1362).Children();
IEnumerable<IPublishedContent> filteredOffers = allOffers.Where(x => x.GetPropertyValue<int>("offersItemCategory") == offersTypeId);
// Return filteredOffers Code Goes Here
}
}
How can I access custom controller's results from view ?
Hi, I am making products listing page with filters. I made custom
SurfaceController
, where i pass filter parameters with<form>
'sGET Method
from view, filter items and here is the problem, how can i return filtered items back to view and how to access them in view? Here isSurfaceController
Code :is working on a reply...