Copied to clipboard

Flag this post as spam?

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


  • Veronica Burd 76 posts 201 karma points
    Feb 17, 2016 @ 10:18
    Veronica Burd
    0

    Can I use an Umbraco Content/Media Picker to select docs/media?

    Hi Tim,

    I'm importing data from a previous CMS and have tens of thousands of paper laid records. From what I've read this may be too much for Umbraco to handle so I implemented the following custom tables:

     paperlaid (basic details)
        pl_pk int <-- unique id
        pl_legislature_fk int <-- Umbraco Doc id
    
     paperlaid_sitting
       pls_pk int <-- unique id
       pls_pl_fk  int <-- foreign key to paper laid
       pls_sitting_fk int <-- Umbraco Doc id
    
     paperlaid_media
          plm_pk int <-- unique id
          plm_pl_fk int <-- foreign key to paper laid
          plm_media_fk <-- Umbraco Media id
    

    A paper laid needs to be linked to:

    • an Umbraco document of content type legislature,
    • one or more Umbraco documents of content type sitting
    • one or more media files.

    I had created my own controller/angular views to handle this before UI-O-Matic became available. However, since this is my first Umbraco project, the code is nowhere near as cleanly implemented or extensible as yours.

    Would it be possible to add options to a field to declare which custom content/media picker should be used to render the field in the UI and then save the id of the chosen item?

    Thanks

    Ver

  • Comment author was deleted

    Feb 17, 2016 @ 11:19

    Hi Ver,

    Of course, you can specify a view on an UIOMaticField, check out the docs here http://uiomatic.readthedocs.org/en/latest/04.CustomPropertyViews/

    Let me know if you have any further questions.

    Cheers, Tim

  • Comment author was deleted

    Feb 17, 2016 @ 11:20

    Content and media picker are already default ones you can use

    http://uiomatic.readthedocs.org/en/latest/03.DefaultPropertyViews/

    ANd you can of course extend UIOMatic with your own custom property views (it's very similar to building a prop editor)

  • Simon 692 posts 1068 karma points
    Mar 09, 2017 @ 14:30
    Simon
    0

    Hi Tim,

    How can I use a Multiple Media picker, in order for the user to select multiple images?

    Thanks

  • Veronica Burd 76 posts 201 karma points
    Feb 17, 2016 @ 11:22
    Veronica Burd
    0

    Great! Thanks for the confirmation.

    Ver

  • Comment author was deleted

    Feb 17, 2016 @ 11:24

    No problem, glad I could help :) for more info on UIOMatic it's good to check the docs http://uiomatic.readthedocs.org/en/latest/ and my blog http://nibble.be

    Cheers, Tim

Please Sign in or register to post replies

Write your reply to:

Draft