Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eli 3 posts 23 karma points
    Jan 29, 2013 @ 14:47
    Eli
    0

    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??

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 29, 2013 @ 19:42
    Jan Skovgaard
    0

    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

  • Eli 3 posts 23 karma points
    Jan 29, 2013 @ 19:56
    Eli
    0

    @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

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 29, 2013 @ 21:02
    Jan Skovgaard
    0

    Hi Eli

    Do you get any usefull information if you add ?umbdebugshowtrace=1 to the url you're requesting?

    /Jan

  • Eli 3 posts 23 karma points
    Jan 30, 2013 @ 13:26
    Eli
    0

    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'"}

Please Sign in or register to post replies

Write your reply to:

Draft