Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/strict-bikes-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apostrophecms/apostrophe-astro": minor
---

`AposTemplate.astro` now forwards any additional props passed to it (beyond `aposData`) to the resolved page template component, matching the existing behavior of `AposArea` and `AposWidget`.
4 changes: 2 additions & 2 deletions packages/apostrophe-astro/components/AposTemplate.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { templates } from 'apostrophe-astro-config/doctypes';

const { aposData } = Astro.props;
const { aposData, ...props } = Astro.props;

// Handle connection and authentication errors
if (aposData.errorFetchingPage || aposData.page?.type === 'apos-fetch-error') {
Expand Down Expand Up @@ -36,4 +36,4 @@ const Template = templates[aposData.template]
|| templates['apos-no-template'];

---
{ Template && <Template {aposData} /> }
{ Template && <Template {aposData} {...props} /> }
Loading