Copied to clipboard

Flag this post as spam?

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


  • Eric Brookins 4 posts 25 karma points
    Jun 20, 2011 @ 17:38
    Eric Brookins
    0

    Using Property from Custom Page Base in Razor Macro

    I have created a custom master page base for use with Umbraco, and that is working just fine.  I am able to grab properties from the master page using syntax such as:

    <h1><%= this.<CustomPropertyName> %></h1>

    What I am having trouble with is sending one of those page base properties as a parameter to a Razor macro I have created.  It won't allow me to us the same syntax above because I receive a server error stating Server tags cannot contain <% ... %> constructs.   I have also tried to access the master page from the CSHTML file, also to no avail.

    I would greatly appreciate it if anyone could help lead me in the right direction.

    Thank you in advance.

    Eric

  • Eric Brookins 4 posts 25 karma points
    Jun 20, 2011 @ 19:00
    Eric Brookins
    1

    I found a super helpful article online that covers this exact topic.  Thanks to Jason at Delphic Sage.  I hope this helps some one else!

    http://www.delphicsage.com/home/blog.aspx/d=854/title=Code_Expressions_to_Programmaticify_Your_Umbraco_Site

     

     

Please Sign in or register to post replies

Write your reply to:

Draft