orchardcms - how to display a list of content items from the front end? -


using orchard 1.6 have created form (accessed front end user)

this form contains content part when submitted stored content item.

from front end display in table format previous content items user has submitted ( user logged in)

as admin can view list dashboard, user has access front end.

how can display list of content items front end?

i'm pretty sure have asked exact question before... , people have said use projections or write own code query content items need.

so content items notes. , have attached notepart them. notepart might this:

public class notepartrecord : contentpartrecord {     public virtual string title { get; set; }      public virtual string notecontent { get; set; }      public virtual userpartrecord userpartrecord{ get; set; } } 

the userpartrecord record of user created it. query this:

this.services.contentmanager                 .query<notepart>()                 .where<notepartrecord>(e => e.userpartrecord.id == user.id)                 .list() 

where services iorchardservices. select data want display or display entire content item.

i recommend looking through orchards source code, examples of how pretty :)


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -