I'm new with Archetype and I can't figure out how to nest them. I want to build a "widget" based website where the client can add these "widgets" so he can build his own pages.
This is what I did:
I created a new data type called Slider, I chose Archetype as my property editor (obviously). I added one fieldset and in the properties section I added a text string
I created a new data type called Page builder. In this data type I added multiple fieldsets (Header, Text and Slider).
I created a new document type named Generic page where I added the Page builder
In my GenericPage.cshtml I have the following code:
Nesting Archetype with partial views
Hi all,
I'm new with Archetype and I can't figure out how to nest them. I want to build a "widget" based website where the client can add these "widgets" so he can build his own pages.
This is what I did:
I created a new data type called Slider, I chose Archetype as my property editor (obviously). I added one fieldset and in the properties section I added a text string
I created a new data type called Page builder. In this data type I added multiple fieldsets (Header, Text and Slider).
I created a new document type named Generic page where I added the Page builder
In my GenericPage.cshtml I have the following code:
The header and text renders perfectly but my slider isn't. How can I render the nested archetype data type?
In my slider.cshtml I added the following code:
I hope this make sence and you guys can help me out.
I have no clue how your model looks right now, but an easy solution to your problem is:
foreachis located (where you get the sliderItem)Model.Content.Properties.sliderItemproperty and check the datatype or see if you've got an other error.FYI, this question was posted twice and was already answered here: https://our.umbraco.org/projects/backoffice-extensions/archetype/sound-off/88381-nesting-archetypes
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.