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

Homepage preview shown in wrong template #1306

Closed
ianef opened this issue Apr 17, 2020 · 2 comments
Closed

Homepage preview shown in wrong template #1306

ianef opened this issue Apr 17, 2020 · 2 comments
Labels
🐛 tag: bug

Comments

@ianef
Copy link

ianef commented Apr 17, 2020

When you preview the homepage from the back-end the wrong template is used.

Question Answer
Relevant Bolt Version master
Install type GitHub checkout
PHP version 7.3
Web server Apache

Reproduction

After a standard git checkout and editing the homepage from the main menu, when the preview button is pressed the preview tab is shown using record.twig and not index.twig. When the homepage is viewed via the frontend the correct template is used (index.twig).

According to the homepage description in config.yaml, the following definition should cause index.twig to be used, there are no overrides define in theme.yml:

# The default content to use for the homepage, and the template to render it
# with. This can either be a specific record (like `page/1`) or a listing of
# records (like `entries`). In the chosen homepage_template, you will have
# `record` or `records` at your disposal, depending on the homepage setting.
#
# Note: If you've changed the filename, and your changes do not show up on
#       the website, be sure to check for a theme.yml file in your themes
#       folder. If a template is set there, it will override the setting here.
homepage: homepage/1
homepage_template: index.twig

there is a work around by adding a 'record_template: index.twig' attribute to the homepage definition in contenttypes.yaml

@bobdenotter
Copy link
Member

bobdenotter commented Apr 18, 2020

Confirmed.. We'll fix this!

@bobdenotter bobdenotter added this to the Bolt 4.0.0 stable milestone Apr 18, 2020
@bobdenotter bobdenotter added the 🐛 tag: bug label Apr 18, 2020
@bobdenotter
Copy link
Member

bobdenotter commented Apr 18, 2020

This has been fixed. Being the oaf that I am, i accidentally pushed straight to the repo, so there's no PR. See: f29cf7e

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

No branches or pull requests

2 participants