OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.42k stars 2.39k forks source link

Content type widget which contain list part can not be managed. #980

Closed jnucpz closed 7 years ago

jnucpz commented 7 years ago

if i define a content type which contian list part, this type is widget. in contentitem,it can not editor. example for: blog

if you create a new blog,it will not be shown. and the blog can not be eidtor.

jnucpz commented 7 years ago

i want the layer add a widget contains a type ,this type have list part. what should i do?

sebastienros commented 7 years ago

If it's a Widget then it can't be ContentItem and edited. So you shouldn't add it on Blog.

I don't understand what you are trying to do. You can't add a type to a layer, you can just add a widget instance. If you want a widget to behave like a list of things, I would suggest you create a new type, let's say MyList then add a Bag part to it, and in the Bag part setting select the type of element you want it to contain, like MyListItem. This way your widget will own all the content, and you can customize it.

jnucpz commented 7 years ago

Thank you for your answer. I want to show two or more blog on the same single page. a single page contains two blog and have respective blogpost list. and , in admin page , i can add blogpost.what should i do ?

sebastienros commented 7 years ago

I would suggest to create two SQL queries like RecenteBlogPost, then create a Liquid Page to render a custom page that uses these queries, or use widgets with Liquid Widgets if they need to be displayed on several pages.

jnucpz commented 7 years ago

Thank you for your solution. it works .thank you