Copied to clipboard

Flag this post as spam?

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


  • Tim Eckel 3 posts 23 karma points
    May 21, 2015 @ 21:03
    Tim Eckel
    0

    Removal of Scripting Files and forcing me to use Partial View Macro Files in Umbraco 7.2 is killing me!

    So, Umbraco 7.2 decided to remove everything I know by removing Scripting Files and forcing me to use Partial View Macro Files instead.  Umbraco makes it seem SO easy to switch.  Basically, just use CurrentPage instead of Model and change @inherits umbraco.MacroEngines.DynamicNodeContext to @inherits umbraco.MacroEngines.DynamicNodeContext.  Sounds simple!  But nothing works...

    For example, previously I would do something like this to get the node type alias:

    @Model.NodeTypeAlias

    So, I change it to the following:

    @CurrentPage.NodeTypeAlias

    And I get nothing.  I can find no information on what I can access with these Partial View Macro Files.  After trying every combination of random words and spending an hour, I finally figured out it should be like this:

    @CurrentPage.DocumentTypeAlias

    How would I know this?  Why is it different? Where is the list of the properties for Partial View Macro Files so I don't have to try every word combination in the English language till I find the correct set of keywords?  Shouldn't these be listed somewhere?  I previously had a DynamicNode cheat sheet but this is now useless as it says the property is NodeTypeAlias which of course no longer works!

    How would I know to use DocumentTypeAlias?  Where is this documented?  Where are the rest of the properties listed to avoid problems like this?  This is not my only problem, I can't figure out how to do NodeById and all kinds of other things which are for some reason different now.

    VERY FRUSTRATED!

    Tim

     

  • Openfield Creative 62 posts 222 karma points
    May 22, 2015 @ 16:19
    Openfield Creative
    0

    Hi Tim,

    Check out the cheat sheet I'm linking to below. It's been a huge help to me.

    https://our.umbraco.org/projects/developer-tools/umbraco-v6-mvc-razor-cheatsheets

    Hope this helps,

    Owen

Please Sign in or register to post replies

Write your reply to:

Draft