Copied to clipboard

Flag this post as spam?

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


  • Roger Withnell 128 posts 613 karma points
    Jul 11, 2015 @ 12:19
    Roger Withnell
    0

    Get editors in a Partial Macro

    I would like to put a Heading and a RTE Editor into a Bootstrap Panel.

    The HTML is:

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">
          Put the Heading Editor here
        </h3>
      </div>
      <div class="panel-body">
        Put the RTE here
      </div>
    </div>
    

    What is the code to put the Heading Editor as the Panel Title and the RTE as the Panel Body?

    Your help would be much appreciated.

    Thanking you in anticipation.

    Roger

  • jigar 170 posts 233 karma points
    Jul 12, 2015 @ 09:57
    jigar
    0

    Hi Roger,

    In order to get the value from umbraco for a field specify in doctype you can use "GetPropertyValue" function of @Current page.

    so you need to have something like....

    @CurrentPage.GetPropertyValue("YourPropertyAlias")
    

    Here YourPropertyAlias is the field name you define while specifying your document types.

    enter image description here

    so for the body define like above image the code will be

    <div class="panel-body">
            @CurrentPage.GetPropertyValue("body")
      </div>
    

    Hope this help!

    Jigar

Please Sign in or register to post replies

Write your reply to:

Draft