Dynamically generated Value Lists

I am looking to create a “Jump to latest” component in the BE which allows a user within the site to click a link and be taken to the latest content within that page. Ideally I’d like content editors to be able to add a “Jump to latest” component to a document, which has a dynamically produced dropdown based on the types of components they have already saved within the document. For example: should a document consist of Components A, B, C and D, the jump to latest component will dynamically render a dropdown with options for A, B, C and D. If component C is removed from the page, the list shall be updated to only include A, B, D within the Jump to latest component.

The selections plugins documented here: Selection Field Configuration are configured based on a fixed value list and not suited for this use case.

1 Like

You linked to SaaS documentation, in which case I don’t think you can do it. In PaaS you can write a ValueListProvider class.

Ahh apologies I added the wrong link . However, unfortunately this still wont work. We’ve used value list backed dropdowns elsewhere, but in this instance we need the values in the list to be dynamically loaded based on the elements saved on the page.

Ah, I don’t think that is achievable. You don’t have access to the right context in a provider class. Or any context really. It may be possible to hack somethign so you can still access the information you need, but it would be ugly and might easily break on upgrades. Not something I would want to recommend.

Ah i see - thanks Jasper for the info!