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
Is it still possible to reference UmbracoHelper in Umbraco 8 with something like the following (this is Umbraco 7 code):
var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
I've checked over the docs the best that I can, and I haven't run across anything yet. Where I need it is in 3-4 places I can't inject it into.
Thanks in advance
I think you can also use
var umbracoHelper = Umbraco.Web.Composing.Current.UmbracoHelper;
This is the best way to access it if you need the UmbracoHelper, but it also depends on what you are doing. It could be better to get access to individual services that provide the underlying functionality.
Thanks I appreciate the help --- that line was exactly what I needed
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Referencing UmbracoHelper
Is it still possible to reference UmbracoHelper in Umbraco 8 with something like the following (this is Umbraco 7 code):
var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
I've checked over the docs the best that I can, and I haven't run across anything yet. Where I need it is in 3-4 places I can't inject it into.
Thanks in advance
I think you can also use
This is the best way to access it if you need the UmbracoHelper, but it also depends on what you are doing. It could be better to get access to individual services that provide the underlying functionality.
Thanks I appreciate the help --- that line was exactly what I needed
is working on a reply...