Skip to content

Different App.PageData for each layout.svelte #13592

Open
@JohnKiller

Description

@JohnKiller

Describe the problem

It would be nice if I could set App.PageData different for each layout, and then the pages inside the layout should be forced to extend that interface.

For example, a website may have a "general" layout and an "administrator" layout. I want to set the title on the layout based on the current page data. But inside the admin portal, it is different.

Describe the proposed solution

Have a way to declare the interface inside layout.svelte instead of app.d.ts

Alternatives considered

No response

Importance

nice to have

Additional Information

Related to #11779 because if I can't enforce it, it's not very useful.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions