Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I used this method to create a custom controller that I can access thru xhr.
(first of all is this still usable / preferable in V8?)
My custom method looks like this and is working.
Now I am stuck with the ordering and filtering.
public ActionResult GetNewsByParentId(int Id,int PageIndex = 0,int PageSize = 10
, string orderby, string direction, string filter = null)
//are there children for this content id?
bool hasChildren = Services.ContentService.HasChildren(Id);
//get the first 10 childeren
IEnumerable<IContent> Children = Services.ContentService.GetPagedChildren(Id, PageIndex, PageSize, out long TotalChildren);
//create Json object
var result = new JsonResult
Data = new
JsonRequestBehavior = JsonRequestBehavior.AllowGet
I would like to now if I can filter by a 1 or multiple custom field
Or can i only use the default properties (publisheddate, Name etc) (and where can I find a list with witch ones)
The ordering direction?
Is there a example how this works (what do I need to fill in).
De filter function
How can I use to search on multiple tags / words / numbers (is this even possible?)
can i use where and or contains?
I hope somebody can help me with a nice example.
Services.ContentService.GetPagedChildren(Id, PageIndex, PageSize, out long TotalChildren,"?","?","?");
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted