-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
file based layout reset #1376
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
Comments
This can already be done by putting ├─ routes/
│ ├─ special/
│ │ ├─ index.svelte
│ │ ├─ $layout.reset.svelte
│ ├─ 0.svelte
│ ├─ $layout.svelte
│ ├─ 1.svelte\
|
Nice, but can you suggest any method by which I can do the same thing but with the root index.svelte.
section 1 and 2 should have same layout but not index.svelte. |
@TheComputerM I'd suggest making a layout component ( src/
├── lib/
│ └── components/
│ └── SectionLayout.svelte
└── routes/
├── index.svelte
├── section-1/
│ ├── index.svelte
│ └── __layout.svelte
└── section-2/
├── index.svelte
└── __layout.svelte I'll admit—it isn't ideal, but it definitely does the job. EDIT: Changed |
Given the structure above, layouts for In a similar #1110, it was proposed to adjust one layout from different routes using context. That approach offers potentially unlimited control over what is done and how, and should, in theory, allow shared layouts to remain actually shared. Please note that in practice the concept of ‘shared’ is currently shaky (see #1214). |
Is your feature request related to a problem? Please describe.
Here is my file structure
I want
0.svelte
and1.svelte
to inherit the layout but notspecial.svelte
.Describe the solution you'd like
The text was updated successfully, but these errors were encountered: