> Compiler Error Message: CS1929: 'IEnumerable<IPublishedContent>' does
> not contain a definition for 'Value' and the best extension method
> overload 'PublishedElementExtensions.Value<bool>(IPublishedElement,
> string, string, string, Fallback, bool)' requires a receiver of type
> 'IPublishedElement'
Get home property from master template
Hi,
So I have the following template layout
If I have a property field in Home, how can I render this in the master template?
Cheers
why would you want to render it in the main template exactly?
The main template should be simply that, a scaffolding template.
you can do this to get a reference to your home page (or something similar)
Hi,
I want a pop up message to appear on every single page.
This is what I have.
But it only seems to work on home page, none of the other pages.
Cheers
Depending on if your hidePopUp is on the home node.. or if it's on your pages then revert back to
Model
Hi Mike,
Thanks for your reply.
I can confirm that hidePopUp is on the home node.
I'm getting this error now.
Thanks again.
Matt
Sorry just glanced
Umbraco.ContentAtRoot().Where(c=>c.ContentType.Alias == "home").FirstOrDefault()
and then check for null before using.Or you can do Model.Root() to get the node at Level 1 in the current pages ancestors. Which is you home node too.
https://our.umbraco.com/Documentation/Reference/Querying/UmbracoHelper/index-v8#contentatroot
is working on a reply...