razordotnetnuke2sxcdotnetnuke-9

2sxc new content type field won't show in razor template


I'm using the 2sx App Events, Courses and Registration version 6.17.1. I'd like to extend the app by adding more fields to the Event content type. I'm running DNN 9.13.04 and 2sxc 17.09.00.

I added new fields to the Event content type. enter image description here

I then configured a new Query to create my own specific Data Stream object. When I run the Query, I see the new fields in the output. enter image description here

I updated the View so that the new Query is being used for that view.

When I edit the Razor file, I can display the field names of the entity and I see the new fields. But when I try to use a foreach loop to build a display list, I get an error. enter image description here

Am I missing a step, or is there something else I need to do to make edits to an app?


Solution

  • After you modify the Content Type and the View, you might need to regenerate the Copilot stuff. This is named very poorly (it has nothing to do with A.I.).

    If that does not work, you'll need to share a little more context. For example, show us the code at or around line 40 in staging/LawEventsList.cshtml.

    enter image description here