Posted on 10/02/2017 15:46:13
Hi Mads
Area and its item template tags is in the context of a pageview and a layout template - and since an order confirmation email is not send in the context of a pageview and a layout template, I should never have been able to work.I just tested this on a DW8, and I can confirm that is the case.
If you used previously a HTML based template and has now shifted to Razor, that could explain it. Because of the way html templates are rendered, you could get html tags to work in other contexts than the one they were in.
The solution is that you can use the API in Razor templates - Razor templates run on base class (RazorTemplateBase<>) - it has a PageView property which will hold an instance of the pageview rendering your i.e. receipt - so you can do like this: Pageview.Area.Item["GeneralLogo"] to get hold of your item property.
In your online marketing mails, which are pages using a layout template, I am sure you have the Area.Item tags available. If you are in one of the templates for one of the modules on the page, you have to use the approach mentioned above.
Hope this clarifies and explains. Please let me know if you can get this to work or you need more input.
BR Nicolai