Copied to clipboard

Flag this post as spam?

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


  • stc 72 posts 101 karma points
    May 24, 2010 @ 16:33
    stc
    0

    programmatically adding items to the document's ultimate picker property?

    Hi guys,

    I was wondering could someone please show me how to programmatically add items to the ultimate picker property (I've searched around for this but couldn't find any examples, I'm guessing something then something trivial like document.getProperty("relatedMedia").Add(nodeID) should hopefully exist and that it could be called numerous times (to add multiple related items) - or instead of that maybe call Add(nodeIDs) - using nodeIDs = (nodeID1 + "," + nodeID2...) since I've read Ultimate Picker holds comma separated data).

    TIA

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    May 24, 2010 @ 20:52
    Richard Soeteman
    0

    Hi,

    I don't have a complete answer for you. But I  suggest you try to find the value in the cmsPropertyData Database table. I think it's a comma seperated field, not 100 sure. So you only have to assign a string with comma seperated nod id's to the  property (document.getProperty("relatedMedia").value = "1021,1480,1320")

    Hope it helps you,

    Richard

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    May 24, 2010 @ 21:18
    Dirk De Grave
    0

    Yep, check either in umbraco.config in /data directory how a value of this datatype is saved and make sure to do it the same way programmatically (value is most likely a comma separated string but can be a xml fragment as well)...

    Bottom line: find a doc that has such an ultimate picker property, and check the vaue in either db or umbraco.config.

     

    Cheers,

    /Dirk

  • stc 72 posts 101 karma points
    May 25, 2010 @ 12:50
    stc
    0

    Hi guys,

      Thanks for your replies first...will try the comma-separated values and check back if I get it to work...

      I'm just rethinking how to use this in the situation where I'd like those values to be inserted/set in a Windows Live Writer editor...one way (my initial thinking) was to insert those ids in a special kind of tags (I'd rewrite the InsertUmbracoLink plugin from Mr. Hoehler) and have them later be cleared/rewritten in the ultimate picker by some custom event handler code of mine...however I saw that there should be a properties (F2) field which should/could be set via the WLW, only it's disabled for me, maybe I setup the content channel wrong?

      Was any one able to setup their description/category/excerpt fields so that more than one property is editable (for me only the bodyText which is set to the description field in the content channel) beside the nodeName - which is auto-set by the title text in the WLW? How please? TIA

Please Sign in or register to post replies

Write your reply to:

Draft