Need help navigating the terminology to write extension that fetches data from the CMS

The concepts you seem to need to grasp to write your own backoffice extensions seem daunting to me. Don’t get me wrong, I am very positive to the web components approach as I think it’s what will give Umbraco longevity.

I have an idea for a property editor I need to write but I fail to understand what concepts I should work with.
I read this page over and over but still cannot decipher what’s needed for what purpose: Terminology | Umbraco CMS

I will describe what I try to accomplish here and then I wonder if anyone more versed in this could give some hints, pointers or rough guidelines on what I should try to accomplish this.

My example is somewhat dumbed down to focus on the concepts needed rather than exact implementation.

The function I am trying to build:

  • I have a document type “work page” with a property pickedSummary that is a node picker.
  • The editor is expected to pick a node in this picker. Let’s call this picked node the “summary page”.
  • This summary page document type has a block list editor. The blocks in this editor have their own single node picker with a “Person” document picked.
  • I am building a new property editor called the “Name list” which will live in the “work page”.
  • I want the “Name list” to do the following:
    – Get the data for the picked node from the pickedSummary property on my “work page”.
    – Looking through this data, find the block list with subsequently picked Persons and then get the data from all respective documents.

Tldr; - I am trying to query data in the CMS based on a value on the same document I am currently editing.
This is where I am lost.

Should I use the management API, or is that complicating it?
Should I use “contexts” somehow? I can’t find a list of what contexts there are, I just know there is one for Notifications (the GUI kind, not the ones like “SavingContentNotification” etc)

So far I’ve managed to build a property editor that runs code at initialization (loading the editor in the backoffice).

I’ve found this: UmbDocumentDetailRepository | @umbraco-cms/backoffice

Which has method requestByUnique. Calling this with a hard coded GUID of a node I’m trying to get info from returns an UmbDocumentDetailModel which initially seemed promising but its values are empty however.

No luck so far finding any other open source extension that does something similar, but I’ll update here if I can find something new.

You are on the right track. Did you look in the variants property yet? Try and check the network request to see what kind of data it gets ahold of.

1 Like

You were right, and kind of me too!

It was a fairly stupid mistake.. my example document actually had no values set yet, all properties were empty.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.