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
Fairly new to Umbraco, so be nice - I've looked around and cannot see an answer to my issue
I have a Home Page and a second page, these are both under a Master template
The second page is a child of the Home page.
I have a partial view rendered in the Master view and then rendered on every page
OK so the problem is that on the Partial Page it has some Values that im passing to it from the Home page.
But when I render the second page the values do not come through.
I understand that the content for these values are on the Home page, but they do not render on the second page.
How can I pass the content from the Home Page to the second page and render it without creating the content on every single page.
The partial views are my header and footers.
You could try a recursive lookup on the property value - if you pass true as an optional parameter of GetPropertyValue() you can recurse up the content tree:
Another option would be to move the property off the homepage and onto a config node, which you can then reference from anywhere in the site.
Personally, I like using config nodes - has the added benefit of being able to provide permissions separate from the rest of the site content.
Thanks for that, I actually just figured that exact same answer out - took ages.
var favIcon = Umbraco.Field("favIcon", recursive: true);
if (favIcon != null)
var favIconimgurl = Umbraco.Media(favIcon.ToString()).Url;
<link href="@favIconimgurl" rel="shortcut icon" type="image/x-icon" />
and then just for normal text.
@Umbraco.Field("leftImageLink", recursive: true)
Awesome - Thanks
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted