'__layout.reset has been removed in favour of named layouts

I have a page set up in this format

original reset image

I looked at forums and it said i should change the inner layout page to [email protected]. However when i do that, I get another error.

reset image using @reset instead of .reset
Does anyone know how i can put in a reset __layout inside of a folder and get it to override the parent layout?



Solution 1:[1]

Your error is because [email protected] would be looking for a __layout-reset.svelte file in it's current directory, or any parent directory directory, to be a sub-layout for. You don't have a __layout-reset.svelte file.

As Thomas Hennes mentioned in the other thread. If you wanted to have it act like the reset, you'd need to create a __layout-reset.svelte file in the current folder or (more useful for the entire app, in the root folder) and have it be a blank <slot />. From there, you can do [email protected] to which will allow you to make a completely new layout.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Josh