I have a single category field (named category) in my section and I am looking to use the auto-generated title to keep these entries titled consistently. I have had success outputting the first category selection into the entry field but I can't seem to grab multiple selections. I have tried a for loop and I can of course getting working on a template but I am thinking the syntax must be different for the auto generated title field.
Here is an example of the tree I am working with.
- Category One
- Sub Cat One
- Sub Cat Two
In a example entry I will have Sub Cat One selected and of course Category One since it is an ancestor of the Sub Cat One. I would like to output something like (Category One / Sub Cat One) in the entry title but I either get no results or just the first one. I have tried the following code:
{% for categoryList in category %}{{categoryList.title}}{% if loop.index < loop.length %}/{% endif %}{% endfor %}
and
{category.first().title}
Which of course contains only the first selected category title.
How do you output more than one category selection in an entry title field?
Thanks!