Copied to clipboard

Flag this post as spam?

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


  • Brett Spencer 88 posts 260 karma points
    Aug 09, 2019 @ 16:27
    Brett Spencer
    0

    Control multiple property editors with the same data source.

    Let me try to explain this with a graphic first: (Umbrao 8)

    I am trying to get a property editor to use the same data that is input by another property editor on the same document type.

    enter image description here

    '#1 takes the dynamic number of inputs. #3 should update with the inputs and look like #2. You can see that under #1 that I am using the same HTML as #3 using the same model.value as #1. I tried to use the same controller and the same model for #3 but nothing is happening. I have no idea what to try next.

    In detail, I am trying to accomplish what I mentioned in this post. The great feedback that I got just doesn't answer this.

    Also, this post has a similar concept and was never replied to.

    How can we accomplish this without using prevalueeditors as that does not, at all, solve the problem? To be clear, this will solve the problem of having to duplicate a document type AND TEMPLATES (like a root) for hundreds of sub-sites that have slight differences like a site, color palette.

  • Brett Spencer 88 posts 260 karma points
    Aug 09, 2019 @ 20:20
    Brett Spencer
    0

    I was really hoping to be able to create a property editor that could be packaged and shared but I'm starting to think that won't happen.

    Here is what I am thinking now:

    1. Create a property editor that will allow the user to add a number of colors to the root document type at the Content level (no prevalues). (Prevalues creates such a troublesome headache and way more work than needs to happen.)

    2. Create a property editor much like the approved property editor that will populate after the above property editor has been saved. (It would be better to be able to have all of these use the same angular data source so all the properties could update on the fly but so far that has proven impossible.)

    3. Save the values of the first property editor to a database by hijacking the Document type Save/ Save and Publish event (method).

    4. When the Document Type is loaded into the Content area for the user to edit, The values of the colors are loaded by pulling them from the database.

    5. When the page is saved the value of the chosen color is saved through Umbraco and code will have to handle breaks between that and available colors strored in the dbase and first property editor.

  • Brett Spencer 88 posts 260 karma points
    Aug 09, 2019 @ 20:36
    Brett Spencer
    0

    Problem with this solution is clash between using my own data source and Umbraco's.

    If I could use a different application that might have worked, But Umbraco's ng-app wraps the property editors and creates the problem... they cannot be nested:

    http://docs.angularjs.org/api/ng/directive/ngApp

Please Sign in or register to post replies

Write your reply to:

Draft