Cannot display more than one content item

Feb 27, 2016 at 12:20 AM
Hello,

I feel like this is elementary, but I have tried multiple times to make sure I am doing this right, and no matter what I do, I cannot get more than one Content item of a content type to show in a view.

Here is my simple example:
I have created a content type called "Profile" with some basic text fields.

I have then created a razor template set to use "Profile" as the Content type, with "Enable Lists" checked off and using "Profile" for ListContent type.

Then, in my razor template, I have the code:
@foreach(var item in AsDynamic(Data["Default"])){
   
    <div class="sc-element">
        @item.EntityTitle
        @item.Toolbar
    </div>
}
And no matter what I do, it will only show one Profile even though I've entered several profiles through the admin UI. Am I missing a step?
Coordinator
Feb 27, 2016 at 11:44 AM
Careful: the "ListContent" name may be missleading you - it's the header item. So the content-type should be profile, the listcontent probably not.

EnableList should be enabled (checked on) of course; now you can add items to this list. Note that enable list doesn't show "all items in the db", only "all items in the list kept by this module". For the DB-approach, you need to use queries.

But try to get this going first so you get your first steps, then build on that :)