Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
I have a site, where all pages should have an image in the top, and to want to use a fallback value, so the user does not have to set an image on every page.
I do what is listed in the docs under Fallback https://our.umbraco.com/documentation/getting-started/design/Rendering-Content/#using-fall-back-methods
var image = Model.Value<IPublishedContent>("image", fallback: Fallback.ToAncestors);
But I just get this error on all pages that does not have a value set in the property
Fallback PublishedValueFallback does not support fallback code '3' at element level.
Can anyone else get this to work, or is there a bug with this?
I found the issue
To be able to use TypedContent in my Partial View, I've set this in the top of the file
@inherits UmbracoViewPage<IHero>
Where Hero is the alias of the doctype I use as a composition on several other doctypes.
Hero
If I change it to
@inherits UmbracoViewPage
It works fine
I don't know if this is a bug, but in any case, I hope the above will help anyone else that might run in to the same issue.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Fallback PublishedValueFallback does not support fallback code '3' at element level
Hi
I have a site, where all pages should have an image in the top, and to want to use a fallback value, so the user does not have to set an image on every page.
I do what is listed in the docs under Fallback https://our.umbraco.com/documentation/getting-started/design/Rendering-Content/#using-fall-back-methods
But I just get this error on all pages that does not have a value set in the property
Can anyone else get this to work, or is there a bug with this?
I found the issue
To be able to use TypedContent in my Partial View, I've set this in the top of the file
Where
Hero
is the alias of the doctype I use as a composition on several other doctypes.If I change it to
It works fine
I don't know if this is a bug, but in any case, I hope the above will help anyone else that might run in to the same issue.
is working on a reply...