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
In cshtml pages we have been using @inherits umbraco.MacroEngines.DynamicNodeContext
In order to take advantage of other capabilities I tried @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
and I get razor error from umbraco. Why??
Hi Eli and welcome to our :)
What kind of errors do you get? And could you please share the code that gives you the error?
Looking forward to hearing from you.
/Jan
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage@using System.Web.UI.WebControls;@using umbraco.NodeFactory;@using umbraco.MacroEngines;@using umbraco.controls;@using umbraco.DataLayer;@using umbraco.businesslogic;@using umbraco.uicontrols;@using umbraco;@{ Utility util = new Utility(); DynamicNode thisNode = new DynamicNode(Model.Content.Id); var _UserId = -1; if (umbraco.cms.presentation.user.EditUser.CurrentUser != null) { _UserId = umbraco.cms.presentation.user.EditUser.CurrentUser.Id; } var loc = Request.Path;}
The error is plain :Error Loading Macro ILT.cshtml
Hi Eli
Do you get any usefull information if you add ?umbdebugshowtrace=1 to the url you're requesting?
exception = {"d:\\Development\\umbracoSource\\src\\Umbraco.Web.UI\\macroScripts\\Demo\\ANewCourse\\_ILT.cshtml(14): error CS0029: Cannot implicitly convert type 'Umbraco.Web.Models.RenderModel' to 'umbraco.MacroEngines.DynamicNode'"}
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
We have 4.11.3.1
In cshtml pages we have been using @inherits umbraco.MacroEngines.DynamicNodeContext
In order to take advantage of other capabilities I tried
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
and I get razor error from umbraco. Why??
Hi Eli and welcome to our :)
What kind of errors do you get? And could you please share the code that gives you the error?
Looking forward to hearing from you.
/Jan
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@using System.Web.UI.WebControls;
@using umbraco.NodeFactory;
@using umbraco.MacroEngines;
@using umbraco.controls;
@using umbraco.DataLayer;
@using umbraco.businesslogic;
@using umbraco.uicontrols;
@using umbraco;
@{
Utility util = new Utility();
DynamicNode thisNode = new DynamicNode(Model.Content.Id);
var _UserId = -1;
if (umbraco.cms.presentation.user.EditUser.CurrentUser != null)
{
_UserId = umbraco.cms.presentation.user.EditUser.CurrentUser.Id;
}
var loc = Request.Path;
}
The error is plain :Error Loading Macro ILT.cshtml
Hi Eli
Do you get any usefull information if you add ?umbdebugshowtrace=1 to the url you're requesting?
/Jan
exception = {"d:\\Development\\umbracoSource\\src\\Umbraco.Web.UI\\macroScripts\\Demo\\ANewCourse\\_ILT.cshtml(14): error CS0029: Cannot implicitly convert type 'Umbraco.Web.Models.RenderModel' to 'umbraco.MacroEngines.DynamicNode'"}
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.