Copied to clipboard

Flag this post as spam?

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


  • Michael Sims 119 posts 387 karma points
    Jun 29, 2015 @ 20:18
    Michael Sims
    0

    LeBlender with Archetype

    Has anyone used LeBlender to render an Archetype data type?

    If so, can I get some pointers? I guess I need to create an editor for the specific Archetype.

    Thanks

  • Antoine 176 posts 1494 karma points
    Jun 30, 2015 @ 06:17
    Antoine
    0

    Hi Michael,

    Yes you can use Archetype with LeBlender, the process will be:

    1. Create your Archetype datatype
    2. Create a new grid editor of type "Leblender editor"
    3. Add a property with your Archetype datatype
    4. Then, your will have to create your partial view for this grid editor and will be able to convert the Leblender items to an ArchetypeModel:

      Model.Items.First().GetValue

  • Michael Sims 119 posts 387 karma points
    Jul 01, 2015 @ 08:40
    Michael Sims
    0

    Thanks - got it working.

    For reference here is what I did to get my model back in the editor:

    @using Archetype.Models; @using Archetype.Extensions;

    @{ var myarchetypemodel = Model.Items.ElementAt(0).GetValue

    }

  • Antoine 176 posts 1494 karma points
    Jul 01, 2015 @ 18:02
    Antoine
    1

    Hi Michael,

    Fyi: You can convert the LeBlender item value to an ArchetypeModel:

    Model.Items.First().GetValue< ArchetypeModel>("list")
    

    Mark it as solve please :)

Please Sign in or register to post replies

Write your reply to:

Draft