Skip to content
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

Antlers code working on html output page but not on reports #325

Open
ali-awwad opened this issue Apr 19, 2024 · 1 comment
Open

Antlers code working on html output page but not on reports #325

ali-awwad opened this issue Apr 19, 2024 · 1 comment

Comments

@ali-awwad
Copy link

If I set the site_name: '{{brand:website_title}}' , the output on the html page is working as expected. However, in the report it shows errro " A site name must be defined."

The reason for referencing to my fields is to support multiple locals.

Another related issue, also working fine on the output html. but does not work on report. if it try to set description: "{{ {excerpt ?? brand:main_description} | strip_tags | safe_truncate(156, '...') }}" , as I am expecting editors to fill in excerpt field but as a fallback at least show a global description insead of empty one.

regards,

@ali-awwad ali-awwad changed the title Antlers code working on page but not report Antlers code working on html output page but not on reports Apr 19, 2024
@ali-awwad
Copy link
Author

As a workaround, chanding the value from

site_name: '{{ brand:website_title }}'

To

site_name: '{{ brand:website_title ?? "My WebSite" }}'

This seems to do the trick. the report shows the site name and the actual pages get the value from brand:website_title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant