Your issue is that you are trying to use a Razor Macro which are only in Umbraco v7 for legacy support.
Assuming you are using MVC templates, you should place your code directly into your View (template) or a Partial View instead of using a Macro. If you are using WebForms templates in v7, you will need Macros but they should be Partial View Macros.
Getting crops from child pages in 7.1
Hi
I'm trying to output the cropped image of child nodes in 7.11 but with no luck. Here's what I have so far:-
My cropper property alias is "bannerImage" and the crop alias is "HomeBanner"
I have a feeling I'm missing something rather stupid but my img src keeps coming out blank.
Thanks in advance
James
Hi James,
Your issue is that you are trying to use a Razor Macro which are only in Umbraco v7 for legacy support.
Assuming you are using MVC templates, you should place your code directly into your View (template) or a Partial View instead of using a Macro. If you are using WebForms templates in v7, you will need Macros but they should be Partial View Macros.
Hope that makes sense?
Jeavon
Ah ok that does make sense. As I'm new to mcv I wonder how I get a node by id as Library.NodeById() only works in razor macros I assume?
James
Edit:
Ignore this post I had mispelt a property all working fine now thanks
Awesome, glad it's working!
@Library.NodeById
does not exist in MVC, you now use@Umbraco.Content
Documentation for the UmbracoHelper can be found here
is working on a reply...