Discussion Group

Syndicate content
Development discussion and project notification for Spark view engine
Updated: 4 min 55 sec ago

Re: Dynamically set the view base type for a partial view?

Tue, 07/20/2010 - 14:39
Hi,

I think partials don't translate to classes, they just get injected
into the views.

I'm not sure about this, but you can check in Spark source code ;).

I'd like to do something like that in the future (for a CMS) so I'm
also interested by that issue.

Guillaume

Dynamically set the view base type for a partial view?

Tue, 07/20/2010 - 14:39
Hi,

Is it possible to dynamically set the view base type for a partial
view?

I'm doing a lot of dynamic page generation, using custom IViewFolder
and IViewFile implementations, and need to set a specific base type
for certain views...it's not a problem injecting the correct block, I
just need to know what block to inject.

Newbie question about re-compiling views

Sun, 07/18/2010 - 12:59
Hi,

I'm using spark with Asp.NET MVC on Mono on Linux, and everything
seems to be installed and working great!

However, I notice that I need to re-compile my application to see
changes reflected in the page. This is fine but it kindof hampers
productivity. If there is a way that I can trigger a re-load from

RE: Loading Spark Views in Area MVC 2.0

Sun, 07/18/2010 - 07:56
Added github/RobertTheGrey as collaborator on github/loudej/spark - not exactly sure what that means to github, but I'm assuming you'll be able to push changes to that central area most people forked from and ci is pointed to.
Sent: Saturday, July 10, 2010 12:09 PM
To: spark-dev@googlegroups.com
I presume you've created a fork of the main repo and can push your changes up?

RE: Loading Spark Views in Area MVC 2.0

Sun, 07/18/2010 - 07:24
Thanks rob. I will try to fork the branch and submit my changes.
Sent from my Verizon Wireless Phone
-----Original Message-----
Sent: Saturday, July 10, 2010 12:08 PM
To: spark-dev@googlegroups.com
I presume you've created a fork of the main repo and can push your changes up? 
Adam - have you perhaps done that?

Re: Loading Spark Views in Area MVC 2.0

Thu, 07/15/2010 - 21:09
I presume you've created a fork of the main repo and can push your changes
up?
Adam - have you perhaps done that?
If so, you can do a pull request from github to have them merged in as a
patch by Louis (or one of the main commiters).
If not, you can email me the changed files (and full paths) and I'll merge

Re: Loading Spark Views in Area MVC 2.0

Thu, 07/15/2010 - 17:57
Thanks Adam for the code. This is what exactly needs to happen. Append the
areas path in the default AreaDescriptorFilter class in the project. Rob, I
made the changes in the source and tested it with areas and runs just fine (
I still need to run test cases though, they dont seems to be loading in my

Re: Loading Spark Views in Area MVC 2.0

Thu, 07/15/2010 - 15:35
I have these two classes and then I just call SparkConfiguration.Configure()
in my global.asax.cs on app start.
This will add register the view engine with Asp.net MVC as well.
*Please not that this is the code for Asp.net MVC 2.*
public static class SparkConfiguration
{
public static void Configure()

Re: Loading Spark Views in Area MVC 2.0

Thu, 07/15/2010 - 06:15
I have code that enables this. Will post in a few hours, when I get home.
Adam

Re: Loading Spark Views in Area MVC 2.0

Thu, 07/15/2010 - 00:55
Hi Jaikishan,
Sounds like you're almost already there with a fix. Why not put the code in
place, and test your areas. If that works, and you run the comprehensive
suite of tests in the source tree and nothing breaks unexpectedly, then I'm
pretty sure a pull request to the main repo will get accepted and rolled

Re: Loading Spark Views in Area MVC 2.0

Wed, 07/14/2010 - 17:30
I would love to see this fixed in spark. +1 for fixing potentiallocations. Using webforms rendering engine in my admin area because of this bug.

Re: Loading Spark Views in Area MVC 2.0

Wed, 07/14/2010 - 14:18
Based on my debugging, it seems that Spark was looking for the view at :
~/Views/Product/Home/Index.spa rk. Since this view is actually located at
(~/Areas/Product/Views/Home/In dex.spark), it is unable to find this view and
therefore goes to parent ~/Views/Home/Index.spark by default. One way to
solve would be create VirtualPathProvider for every file request starting

Loading Spark Views in Area MVC 2.0

Tue, 07/13/2010 - 23:11
Hello,
I am working on a MVC 2.0 application in which I have an area named Product.
Both the root and the product area defaults the request to Home controller
and Index view. When I hit the root of the application it correctly displays
the view located at the root ~/Views/Home/Index.spark. However, when I hit

Re: Content Element Order

Tue, 07/13/2010 - 16:16
You could also potentially use this trick:
[link]
<[link]>
Regards,
Rob
On Fri, Jul 9, 2010 at 4:56 PM, Igor Loginov (aka ilog2000) <

Re: Content Element Order

Tue, 07/13/2010 - 05:37
And did you try to define a new content in Tickers.spark (<use
content="nested_styles" />) and to use it from view instead of
recalling <content name="styles"> ?

Re: Content Element Order

Mon, 07/12/2010 - 22:13
Well, the structure I meant was a base master, nested master, and
view. In the case of just including css, I have:

Admin.spark (the base master for all admin tools) which has:
<link rel="stylesheet" type="text/css" href="/css/admin.css"/>
<use content="styles"/>

Tickers.spark (nested master for all ticker admin views) which has:

Re: SparkView and JQuery-tmpl

Mon, 07/12/2010 - 17:09
I might be wrong, but $$ escaping brings the problem how to get
literal end. No?

For me the minimalistic way is to have only one escape sequence ##
which means "Don't process ${} in this line"...

Re: Content Element Order

Sun, 07/11/2010 - 18:55
A little bit strange structure... OK, let's take a look:
- html.spark is a master page (layout) and there is content definition
<use content="head" />
- Application.spark and View.spark are two views, they both have <use
master="html" />. Normally, different views correspond to different
actions and cannot co-exist on the page. You found a way to combine

Re: Created Issue: JavaScriptView works slightly difference [6462]

Sun, 07/11/2010 - 11:29
Although you should expect the same result, the best practice may be
to use $!{Product.Barcode} since it may be null. Hopefully that will
fixed the Javascript result, but I can't say for sure.

From [link] :
"The syntax $!{expression} can also be used if you want to ensure any

Re: Visual Studio intellisense

Sun, 07/11/2010 - 03:29
Please let me know when the beta with msi package is available. I'm
starting on a new web project now, and I'm going to try out spark with
vs 2010. Hopefully it won't be too painfull.

Henning