Hi.
I'd like to get the values from a selectize field.
I have this in item.yaml:
header.author:
type: selectize
multiple: true
size: medium
label: Author
In blog-item.html.twig I have:
{% if page.header.author %}
{% set authors = page.header.author.get() %}
{% else %}
{% set authors = taxonomylist.get() %}
{% endif %}
{% for author,value in authors['author'] %}
<a href="{{ blog.url|rtrim('/') }}/author{{ config.system.param_sep }}{{ author }}" itemprop="keywords">{{ tag }}<span rel="author"> {{ author }} </span></a>
{% endfor %}
I can get the values from the author taxonomy in options tab, but I don't know how I can get that values from the page.header.author (in blog item tab). This is a selectize field. The result in item.md is:
taxonomy:
tag:
- tag1
author:
- author1
author:
- author2
I'd also like to be able to get the values from header.author, in case the user doesn't use the author taxonomy in options tab.
Any idea for this (sorry, I'm begginer with PHP and Twig)
Thanks in advanced.