Home > Skinning > Custom Layouts
In some scenarios you may want to add a custom layout file for a given page on your site. AspDotNetStorefront provides two ways to do this.
Custom layouts can be a useful tool when modifying the look and feel of your website. We recommend though that you try not to overdo it. We'll often see sites that have many custom layout files in them for several different pages. In some cases this may have been necessary, but in other cases we find that there is only a small difference between the files. When you just have a small display difference for a certain page it's often best to use a partial view to add logic around that section of the layout. This way you don't have to maintain 10 different layouts that are all 90% the same.
We're going to walk through creating a custom layout for the home page view of our site.
Layout = ViewEngines.Engines.FindViewPath(ViewContext.Controller.ControllerContext, "_HomeLayout");
If you need to add a custom layout for for a category page for example you can enable template switching. For instructions on how to create a custom layout see the tutorial above on creating a custom layout for the home page.