Copied to clipboard

Flag this post as spam?

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


  • Peter 6 posts 26 karma points
    Dec 06, 2011 @ 04:24
    Peter
    0

    Get Generic Property From .NET Macro?

    How do I get a Generic Property for the current page using .NET code?

     

    Thanks.

  • Peter 6 posts 26 karma points
    Dec 06, 2011 @ 04:30
    Peter
    0

    Looks like I found the answer in the guts of the Umbraco Commerce code:

    // umbraco.dll
    using umbraco.presentation.nodeFactory;

    // cms.dll
    using umbraco.cms.businesslogic.web;

    ... 

     

    Node currPage = Node.GetCurrent();
    Document currPageDoc = new Document(currPage.Id);

    if (currPageDoc.getProperty("propertyName") != null)

    ...

     

Please Sign in or register to post replies

Write your reply to:

Draft