Skip to content

Commit

Permalink
fix(twig): Handle preview page of SyliusCmsPagePlugin render
Browse files Browse the repository at this point in the history
  • Loading branch information
welcoMattic committed Oct 1, 2024
1 parent a5e92de commit 5bc4667
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Twig/RichEditorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@ private function isAdmin(array $context): bool
return false;
}

// If we are on the SyliusCmsPagePlugin preview page, we need to load Shop templates.
if ('monsieurbiz_cms_page_admin_page_preview' === $request->get('_route')) {
return false;
}

return self::ADMIN_FIREWALL_CONTEXT === $request->get('_firewall_context');
}
}

0 comments on commit 5bc4667

Please sign in to comment.