then i have setup the needed "subpartials" and they load fine. My problem arises when trying to get actual data from the nested content in the sub partial. Just doing:
@Model.GetProperty("spalte1").Value()
returns: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'Value'
As a test within your loop in the main partial, how about putting an if statement to target one of your nested content types and trying to ouptut a value - this will help identify where the issue lies, e.g.
Nested content - multiple doctypes - render in partials
im trying to render a nested content in x number of partials based on the different doc types used.
i have the main partial set up like this:
then i have setup the needed "subpartials" and they load fine. My problem arises when trying to get actual data from the nested content in the sub partial. Just doing:
returns: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'Value'
Any pointers?
Hi Claushingebjerg
As a test within your loop in the main partial, how about putting an if statement to target one of your nested content types and trying to ouptut a value - this will help identify where the issue lies, e.g.
The other consideration is what your sub partials are setup like - maybe post one example here ?
Hope this helps
Nigel
Hi Nigel
The example is in my first post. First code block is the main partial. Second block is the sub partial
BTW if i do
in the subpartial it returns
Umbraco.Web.PublishedCache.PublishedElementPropertyBase
How about @Model.GetProperty("spalte1").Value.ToString() ?
Well... As Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'Value' i cant convert it to a string ;)
is working on a reply...