Copied to clipboard

Flag this post as spam?

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


  • vi-afk 2 posts 22 karma points
    Mar 17, 2021 @ 10:45
    vi-afk
    0

    Content Picker: when "Ignore user start nodes" is not enough

    Hello.

    I have node "Warehouse", under that there is multiple "Category"-ies, and under it there are multiple "Product"s.

    Users might have their start nodes on "Category" or even "Product". And they must create content in "Movement", each object contain link to the "Product".

    How do I organize Content Picker? If I set start node for it on "Warehouse", then these limited users will not be able to pick up anything. If I turn on "Ignore User Start Nodes", then they will be able to select just anything, but I need them to select only what their start node allows them.

    I don't want to organize "Movement" into the tree, like "Warehouse", it will be out of sync very fast.

    Why I can't pick up the children of "Warehouse" while "Ignore User Start Nodes" is off? I mean, I don't need this reason, I need some quick intro into picker forging, so I can hack existing or make my own, with desired behaviour - show children of "Warehouse" available by current user permissions.

    PS. I've came on this: https://our.umbraco.com/documentation/Tutorials/Creating-a-Property-Editor/ , not hard at all. But where can I get source of current Multi Node Treepicker?

  • vi-afk 2 posts 22 karma points
    Mar 25, 2021 @ 16:25
    vi-afk
    0

    Hello, anyone?

    I've managed to create custom property picker, but what should I store into model.value to truly represent a node, like ContentPicker does? After my query I have array of node ids.

    Now, I get PublishedContent out of it:

    var node = Umbraco.Content(id);
    

    and I use Name from it for text representation, Id and Url for reference:

    <select ng-model="model.value">
        <option ng-repeat="item in items" ng-value="item.Id">{{item.Name}}</option>
    </select>
    

    However, this is not what ContentPicker stores, not full-fledged node. If I query document containing my special property, Id is all I get. Querying document containing ContentPicker-powered property gets you all the node, with Parent and so on. How to?

Please Sign in or register to post replies

Write your reply to:

Draft