Skip to content

Commit

Permalink
Content for templates root
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Jan 17, 2024
1 parent 2c02f24 commit ac0930d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/edit-site/src/components/page-main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ export default function PageMain() {
params: { path },
} = useLocation();

if ( path === '/wp_template/all' ) {
if (
path === '/wp_template/all' ||
( path === '/wp_template' && window?.__experimentalAdminViews )
) {
return <PageTemplates />;
} else if ( path === '/wp_template_part/all' ) {
return <PageTemplateParts />;
Expand Down
1 change: 1 addition & 0 deletions packages/edit-site/src/utils/get-is-list-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default function getIsListPage(
return (
[ '/wp_template/all', '/wp_template_part/all' ].includes( path ) ||
( path === '/page' && window?.__experimentalAdminViews ) ||
( path === '/wp_template' && window?.__experimentalAdminViews ) ||
( path === '/patterns' &&
// Don't treat "/patterns" without categoryType and categoryId as a
// list page in mobile because the sidebar covers the whole page.
Expand Down

0 comments on commit ac0930d

Please sign in to comment.