Copied to clipboard

Flag this post as spam?

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


  • blackhawk 313 posts 1368 karma points
    Sep 25, 2017 @ 17:13
    blackhawk
    0

    Documentation on uTaxonomy for basic use

    Is there any documentation, videos or tutorials online for doing some basic processes with uTaxonomy?

    I have it wired up in Umbraco 7.6.5, and able to create custom taxonomies for each content node that associates to the taxonomy property editor...but what can we do next?

    Thanks

  • Delete 61 posts 450 karma points
    Sep 26, 2017 @ 08:13
    Delete
    100

    Hi,

    I'll try to explain how to work with our plugin.

    1. After install, you need to add a Data type and add some items.

    Create new Data Type

    1. Then, you have to add this data type to any Document type

    Add Data type to Document type

    1. After, you can add new Document and fill in all properties, or change old. Fill in

    2. After that, you can do, for example:

    enter image description here

    Also, If you need you can get all items from Data type like a tree:

    var items = TaxonomyService.GetTaxonomyTree("Gender");
    

    like flatten list:

    var items = TaxonomyService.FlattenList("Gender");
    

    get concrete taxonomy item by id. Use data type name and item id (Guid) as parameters:

    var item = TaxonomyService.GetTaxonomyById("Gender", "7ce50708-8aa0-40ca-acc9-1dad950803ab");
    var item = TaxonomyService.GetTaxonomyById("Gender", Guid.Parse("b99411a2-f78c-4afb-a112-6d7e15a8d270"));
    

    I hope, I helped you.

    Let me know if you have questions.

    Thanks.

  • blackhawk 313 posts 1368 karma points
    Sep 26, 2017 @ 18:28
    blackhawk
    0

    The following examples worked for me, in addition to others...

    @{
        //Through Taxonomy Service
        var taxitems = TaxonomyService.FlattenList("mDataTaxonomies");
    
        foreach (var item in taxitems)
        {
          <p>my item: @item.Id</p>
        }
    
        //Now through Model Content...
        var taxitemsB = Model.Content.GetPropertyValue<List<Taxonomy>>("mtaxonomies");
    
        foreach (var item in taxitemsB)
        {
          <p>my B item: @item.Title</p>
        }
     }
    

    From visual Studio, I can click on var and click F12 and see that the Id (Guid), Title, and Parent are available for me to use on @item

    Thanks again for all the help!

Please Sign in or register to post replies

Write your reply to:

Draft