I need to set the page title like this:
{% if entry.artistFirstName | length %}
{{ entry.artistFirstName | capitalize }}
{% endif %}
{{ entry.title | capitalize }}
So if a first name is set I need to display it, but if not I only need to display the entry's title.
Here is one of the solutions I've tried but unfortunately does not work:
{% set title = {% if entry.artistFirstName | length %}
{{ entry.artistFirstName | capitalize }}
{% endif %}
{{ entry.title | capitalize }} %}
It does not seem possible to define something in something that is being defined. Any idea how to get around this?