Question

I am using the SparkViewEngine with ASP.NET MVC 1.0 and was wondering if there is a way to include another View within your current view.

For example, I have this view called ResourceManager.spark. Inside this file, I want to include another sub-view called Resources.spark.

Thanks! Abe

Was it helpful?

Solution

Yes you can using a partial file. The syntax is

<use file="Resources" />

it will then look for a file called Resources.spark in the View/<ControllerName> directory and if that isn't found in the shared directory.

If you name the file _Resources.spark then you could also use it as a custom element (sans the underscore) like so

<resources />

for more information see http://sparkviewengine.com/documentation/organizingcontent#Parsingandrenderingpartialfiles

OTHER TIPS

Sure, you can use named content areas.

Take a look at the documentation on the Spark website

There is also a good video tutorial at DimeCasts.Net

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top