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

Single Page Editing: front page loading #43289

Closed
2 tasks done
vindl opened this issue Jun 15, 2020 · 4 comments
Closed
2 tasks done

Single Page Editing: front page loading #43289

vindl opened this issue Jun 15, 2020 · 4 comments

Comments

@vindl
Copy link
Member

vindl commented Jun 15, 2020

In order to display the correct page when we load users in the site editor we'll need to accomplish the following tasks:

  • Ensure that Site Editor loads the selected static front page by default. It needs to load the correct template associated with that page. (@noahtallen)
  • That template should contain a post content block and it should be prefilled with front page’s content.

For the second part it would be good to verify if Seedlet blocks theme contains the appropriate page template in the first place and add it if that's not the case.

@ockham
Copy link
Contributor

ockham commented Jun 16, 2020

Ensure that Site Editor loads the selected static front page by default. It needs to load the correct template associated with that page.

I think that this should Gutenberg's responsibility (and thus, implemented there) -- it makes sense for Gutenberg to always show whatever template is responsible for rendering the site's home page upon first loading the Site Editor (which in our case happens to be a static front page). By and large, I think's this is how it works already (possibly pending WordPress/gutenberg#23186).

@vindl
Copy link
Member Author

vindl commented Jun 16, 2020

I think that this should Gutenberg's responsibility (and thus, implemented there)

I think so too. I believe it will work out of the box but we agreed to split it out as a separate thing just in case.

@noahtallen
Copy link
Contributor

I'm closing this because all the changes should be working in core:

  • If your site is set to display latest posts, seedlet-blocks uses the home template which includes the posts block. This is the template which displays when you first enter the editor as well.
  • If your site is set to display a static front page, seedlet-blocks uses the singular template, which includes post title and post content. When loading the editor, it correct loads the set homepage title and content.

Some fixes were made in core to accomplish this:

@noahtallen
Copy link
Contributor

I should also note that in the site editor, we already deliberately set the initial view to the homepage, whether it's a page or post.

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

No branches or pull requests

3 participants