Hi DW,
I'm trying to nest includes in a Razor file, but i cannot get it to work properly.
My desired include order:
- eCom/Products/product.cshtml
- Include: "eCom/Products/includes/product-related-products.cshtml", Tag: @Include("includes/product-related-products.cshtml") <- Works
- Include: "eCom/ProductList/includes/product-grid-item.cshtml", Tag: @Include("WHAT SHOULD I WRITE?") <- I can't get this include to work
- Include: "eCom/Products/includes/product-related-products.cshtml", Tag: @Include("includes/product-related-products.cshtml") <- Works
I tried varies version of include path but i always get the "System.ArgumentException: No template could be resolved with name 'path'" error.
Some of the variations i tried:
@Include("../../productlist/includes/product-grid-item.cshtml")
@Include("../productlist/includes/product-grid-item.cshtml")
@Include("/Templates/ecom/productlist/includes/product-grid-item.cshtml")
@Include("/Files/Templates/ecom/productlist/includes/product-grid-item.cshtml")
Is it not possible to exit the root folder e.g. Ecom/Products in this case?
// Martin