Copied to clipboard

Flag this post as spam?

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


  • Tim Connell 3 posts 73 karma points
    Jan 06, 2021 @ 19:36
    Tim Connell
    0

    Document Type Shared Values

    In Umbraco 8 is there any way to create a property on a document type that has a single value shared by all instantiated documents? My use case is that I am trying to sync Umbraco content with another system (document type == table). My hope was to let non-developers define the table to sync to when setting up the document type (i.e. no code).

    I looked at the Umbraco.Label property editor but don't see a way to set a value outside of code. I've also tried creating my own property editor, but that won't let me set a value during document type creation. I can use a prevalue to set a default and then make the actual editor read only, but that means that each document type gets its own instance of the data type. I expect there to be a lot of document types over time, so that's not a great option.

    thx

  • Amir Khan 1190 posts 2557 karma points
    Jan 06, 2021 @ 20:02
    Amir Khan
    0

    Could you name the document type the same as the table and use the alias?

  • Tim Connell 3 posts 73 karma points
    Jan 06, 2021 @ 20:07
    Tim Connell
    0

    Thanks for the response. That is my fallback (and current plan for syncing fields). I was hoping for something more robust. Eventually I want to go as far as using a select list to avoid typos, etc. My other thought is to set up a separate document type structure to associate document types and tables. That would also have the benefit of including field mappings as well. But it would be an additional step

  • Nik 1391 posts 6128 karma points MVP 3x c-trib
    Jan 06, 2021 @ 22:03
    Nik
    0

    You could create a custom property editor.

    That could then have a pre-value lookup that allows the person adding the property to the doc type to pick from a pre-defined list of values (i.e. your table options).

Please Sign in or register to post replies

Write your reply to:

Draft