New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update title #10834
Update title #10834
Conversation
{%- if categoryTitle is defined %}{{ categoryTitle }} - {% endif %} | ||
{%- if not isCustomLogo %}Piwik{% endif %} | ||
{% set branding = isCustomLogo ? '' : 'Piwik' %} | ||
{{ [title, categoryTitle, branding]|join(' - ')|trim('- ') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting here an error when categoryTitle
is not defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added default filter, see new commit
Add default filter
{%- if categoryTitle is defined %}{{ categoryTitle }} - {% endif %} | ||
{%- if not isCustomLogo %}Piwik{% endif %} | ||
{% set branding = isCustomLogo ? '' : 'Piwik' %} | ||
{{ [title, categoryTitle|default, branding]|join(' - ')|trim('- ') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now see that there was before a check for title is defined
so I'm now thinking the title
might not be defined sometimes as well. To you mind adding a title|default('')
?
I'm wondering if it would actually work when title and category title is not defined? Wouldn't it be maybe something like - - Piwik
because it first starts with a whitespace and would be maybe not trimmed because of that? Maybe needs another trim(' - ')
?
BTW I have sent you an email recently. Not sure if I used right email address. Feel free to get in touch otherwise via hello at piwik.org :) |
Suggestion for #10833