In DXA, we can create listing pages to list items based on schema [Article] and [News Article].
Now I haved creates a schema named [Special Offer] and corresponding view and model in a custom module [TrainingEducation]. It worked well.
The next step, I want to create a listing page to list items based on my new schema.
I found that in DXA Core Module, the model used for Listing is [ContentList.cs], controller used for Listing is [ListController.cs] and view used for listing is [PagedList.cshtml]. I'm trying to create a new view used for listing my custom items and use it with the model & controller used in Core.
Below is the figure for my idea:
I added the code at the top of the new view used for listing.
I registered the new view using below code.
RegisterViewModel("List", typeof(ContentList<SpecialOffer>), "List");
1. I created a new keyword in [Content Type] 2. I created a new CT linked with the new view:
3. I created a listing page using component based on schema [Content Query] and new CT. The page showed like below:
The Content Query Component used for listing:
The items showed on the listing page have no idea with components based on schema [Special Offer]. I don't know where the component are from. And have no idea about which step should I take.
Any information or advice would be appreciated.
Thanks in advance.