-
I want to insert a form I've created into a particular Content Item. I have a Controller and View, and will be setting up a Driver as well. It's just not clear to me how I would insert it into a specific Content Item I created in the ~/Admin. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It seems like using the ContentItemID I would be able to accomplish what I wanted, but there's two issues with that (as far as I can tell): 1) If I ever delete and create a new content item, I'd have to go back and update the code with the ID; and 2) seemingly, if I inject a shape, then I'd have to keep the .cshtml file in ~/Views or ~/Views/Items instead of ~/Views/ControllerName/ActionName.cshtml, which can get messy. I wanted to avoid replicating the HTML which I had inserted in the Content Item with Fields/Parts/Zones using Theme templates, but it's likely the only way to go to keep things clean - so I'll just be using a Module and replicating some of the content item code for the form pages I am creating. |
Beta Was this translation helpful? Give feedback.
It seems like using the ContentItemID I would be able to accomplish what I wanted, but there's two issues with that (as far as I can tell): 1) If I ever delete and create a new content item, I'd have to go back and update the code with the ID; and 2) seemingly, if I inject a shape, then I'd have to keep the .cshtml file in ~/Views or ~/Views/Items instead of ~/Views/ControllerName/ActionName.cshtml, which can get messy.
I wanted to avoid replicating the HTML which I had inserted in the Content Item with Fields/Parts/Zones using Theme templates, but it's likely the only way to go to keep things clean - so I'll just be using a Module and replicating some of the content item code for the for…