Using HasValue() with AncestorOrSelf() in MacroPartial
Should be pretty self-explanatory of what I'm trying to do, but I'm getting definition not present [on HasValue] exception. Could someone help me out to what the line "should" be. Here's my last incarnation of trying different things:
var pageWithAds = CurrentPage.AncestorOrSelf((Func<dynamic, bool>)(p => p.HasValue("rotationAds"))).FirstOrDefault();
Using HasValue() with AncestorOrSelf() in MacroPartial
Should be pretty self-explanatory of what I'm trying to do, but I'm getting definition not present [on HasValue] exception. Could someone help me out to what the line "should" be. Here's my last incarnation of trying different things:
I would go for the the strong typed version of this.
Im pretty sure that will give you what you want. It will return an IPublishedContent Item rather than Dynamic
Peter
Thanks, Peter. That did it and having typed is a bonus. Here's my final code (unless someone sees a flaw):
is working on a reply...