Copied to clipboard

Flag this post as spam?

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


  • Robert Dougan 48 posts 154 karma points
    Jan 11, 2013 @ 16:29
    Robert Dougan
    0

    Saving Tags Using the API

    Hi,

    I have a CSV string of values that I want to save into a tags datatype property.

    I thought I could do this by simply assigning the CSV to the property of the item I'm working with (in my case a Media item) like this:

    string tags = "robert,dougan,developer";
    mediaItem.getProperty("tags").Value = tags;

    However this doesn't work. Does anyone know how to do this?

    Thanks,

    Robert

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Jan 15, 2013 @ 10:47
    Lee Kelleher
    100

    Hi Robert,

    It sounds like the CSV values aren't registered as 'tags' in the database.

    See my answer on this other post: http://our.umbraco.org/forum/developers/api-questions/14273-Adding-Data-To-Tags-DataType?p=0#comment52646

    Cheers, Lee.

  • Robert Dougan 48 posts 154 karma points
    Jan 15, 2013 @ 12:24
    Robert Dougan
    0

    Ah great, thanks Lee, this looks like the problem.

    Robert

Please Sign in or register to post replies

Write your reply to:

Draft