Copied to clipboard

Flag this post as spam?

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


  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Jul 14, 2016 @ 09:55
    Michaël Vanbrabandt
    0

    Get standard properties of current page in angular in custom property editor

    Hi,

    I am creating my first property editor plugin in Umbraco 7.4.3.

    For now I have 2 textarea tags in my editor that are referenced by:

    model.value.text1
    

    and

    model.value.text2
    

    Now I want to show a preview in the property editor which includes these 2 values but I also need the url of the current page I am working on.

    <div class="preview-container">
        <span class="preview-title" ng-bind-html-unsafe="model.value.text1"></span><br />
        <span class="preview-url" ng-bind-html-unsafe="model.value.url"></span><br />
        <span class="preview-description" ng-bind-html-unsafe="model.value.text2"></span>
    </div>
    

    So I need to store the current page url in model.value.url

    /Michaël

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Jul 14, 2016 @ 13:20
    Michaël Vanbrabandt
    100

    For others that need to access the current page properties, you can use the editorState service which contains a lot of usefull information!

    /Michaël

Please Sign in or register to post replies

Write your reply to:

Draft