Multiselect plugin - Output

HI,

I have installed https://github.com/distantnative/field-multiselect.
My Blueprint:

  role:
    label: My Role
    type: multiselect
    search: false
    options:
      Concept: Concept
      Art Direction: Art Direction
      User Interface: User Interface
      User Experience: User Experience

I would like to have each item in a LI.
I suppose a foreach function. Can someone give me an example?

It’s all in the documentation of the plugin:

Use Case: Related Pages

A great use for the multiselect field are related pages/articles. Just set up e.g. your glog article blueprint as follows:

related:
label: Related Articles
type: multiselect
search: true
options: query
query:
fetch: siblings
value: β€˜{{id}}’
And then use them in your template:

<?php foreach($page->related()->pages(',') as $related): ?>

…

<?php endforeach ?>

Replace related with the name of your field.

1 Like