-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Named layouts #4388
Named layouts #4388
Conversation
🦋 Changeset detectedLatest commit: 001a235 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
* add missing layout error * simplify layout nodes compression Co-authored-by: mrkishi <[email protected]>
Co-authored-by: Ben McCann <[email protected]>
I still don't get it. When I have nested folder and there I created layout-foo.svelte |
- Remove obsolete layout reset via sveltejs/kit#4388 - Update CssGrid component to accept a class attribute
This comment was marked as off-topic.
This comment was marked as off-topic.
I'm currently having this issue. Default layout still appears and wraps around the named layout. Is there a solution you have found? [Edit]: I placed the named layout in /routes instead of having it in the nested folder and it works as intended here. |
That doesn't seem to be the case for me. I'm trying to implement an auth guard behavior and been racking my brain on it a bit. I'm trying to use the default layout as an auth guard to redirect unauthenticated users for all pages, and then using a named My file structure is like this:
|
That's pretty much what my new structure looks like. I had originally tried doing:
but it was wrapping the default __layout.svelte (contains header and footer) around the "test" layout. I switched to this structure:
and it works the way I thought it should, only rendering the test layout. |
@ObieMunoz Interesting, that's what I had, and it wasn't working. The named layout was in the same directory as the main layout. I scrapped my project and starting over from scratch I can't reproduce, and it seems to be working as expected. |
|
- Remove obsolete layout reset via sveltejs/kit#4388 - Update CssGrid component to accept a class attribute
Differences from #4275:
@
character instead of#
, because URL encoding[email protected]
)[email protected]
orpage@~.svelte
, they are now unnecessaryDocs here. I'm not completely happy with them but I think the interactive version will be much clearer.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpx changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0