It is probably me being stupid but it is there some information
missing in the "Adding a view folder to config" section here
http://sparkviewengine.com/documentation/viewlocations ?
If I just want to add one filesystem directory (called "Reports") what
should I do?
The suggested possible attributes of the "add" xml tag are: name,
folderType, type, constuctor-param-names, and subfolder. Which one of
these should I use to specify the folder name?
The examples on the same page use assembly, resourcePath, and
virtualBaseDir attributes which aren't in the list above, which makes
me wonder if there are some other undocumented ones?
Apologies if I'm just being dozy.
regards,
Jordan.
Try this:
SparkSettings.AddViewFolder(ViewFolderType.FileSystem,
viewFolderParameters)
where viewFolderParameters in the physical location of your views
Regards,
Franc
Many thanks for the reply. Iim in a web app so I've realised I need
ViewFolderType.VirtualPathProvider, but I still don't understand why
we need to pass in dictionary. Whats the "key" and whats the "value"?
ps - also, does the xml in web.config not work?
cheers,
Jordan.
Sorry to spam the list but even after Francs reply I'm still none the
wiser. Anything I try in code or XML either results in the new folder
not being added, or I get an IndexOutOfRangeException when trying to
hit any page in the webapp.
What I am trying to do is add a directory under Views called
"Reports" (ie ~/Views/Reports) that spark will look in when trying to
resolve a view.
cheers,
Jordan.
--
You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
To post to this group, send email to spar...@googlegroups.com.
To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spark-dev?hl=en.