1

I feel like I'm missing something obvious - but I want to use the Name Value List field type so the user can select from a list of values. How/where do I create the dynamic values that would populate this list? I just want a drop down list with 4 selectable text items in there.

If I'm supposed to insert a content item of a particular type that has the dynamic values area - then what is the path to that template? Have tried searching for something but nothing relevant is coming up.

enter image description here

I am using Sitecore 9.1.

I could use a custom template for each text value, and then use a drop list and point to a folder of these items but it seems a bit overkill when the custom template will have a single field that will drive other logic.

2
  • Which part of the Name Value List do you want do be selectable? the Name or the Value?
    – Richard Seal
    Sep 30, 2019 at 12:46
  • If the source will always point to the same set of items then you can have a folder that contains the items then point the datasource to that container. If you need the source to be dynamic based on the content created, then you will need to implement a custom token to resolve the source Sep 30, 2019 at 21:01

1 Answer 1

2

You need to create an instance of your template and specify your Name Value pairs in that item. See the example below:

Example Template:

Example Template

Example Item:

Example item

Alternatively depending on your requirements you could employ a custom field rather than Name Value List to specify the list of values that will rarely change in the template itself. I've done this before when creating a custom Day field and I have used the Source field to specify a pipe delimited list of days to appear in the list. There are many ways of doing this, you could roll your own or use an example such as the Value List Field by Pete Navarra.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.