I would like to do something like the following with spark.
<viewdata model="IList[[string]]" />
<for each="var file in Model">
<use import="${file}" />
</for>
This however, does not work because Spark is not evaluating the ${file}
before it tries the import. This makes sense and I suspected it would not work, but how else could I do something like this.
Note: The model is a list of file names.
You can always use Html.RenderPartial():
Edit:
I don't believe there is much better way, but if you really don't writing RenderPartial, you can do it once. You'll have to create _useview.spark:
and then use it like that: