Discussion Group
Re: Visual Studio intellisense
Best way to make a grouped foreach
I was wondering what was the most elegant way to achieve this:
products is a list of X products, I want 2 products in each <li> like
that:
<ul>
<li>
Product1
Product2
</li>
<li>
Product3
Product4
</li>
<li>
Product5
</li>
</ul>
I did it with two <if>${"<li>"}</if> and conditions on productIndex/
Extending spark with custom attributes
with spark. I stumbled across ISparkExtension but am not sur if it's
what I should use. Basically i have a fairly complex permission system
and am trying to minimize the intrusiveness of the permission system
by adding custom attributes to securable items like so:
RE: class keyword
You might want to run with a custom build that doesn't have that swap in it... Or if there's a way to pass the language type into the grammar class constructor some of those rules could be made to vary based on what the target language is.
Re: Visual Studio intellisense
Re: Binding
wanted to create a definition list with lambda expressions and the
same convention across the site like so:
<props if="Model.HasOwnerInfo()">
<prop exp="project=>project.OwnerRol ePlayerName" term="Name" />
<prop exp="project=>project.OwnerPro jectNumber1" />
MVC2 intellisense
really stuck.
I have upgraded an ASP.net MVC project to MVC 2.0 and everything is
working fine, including Spark 1.1 at runtime, except that the
intellisense I'm getting in VS2008 still seems to be referencing MVC
1.0 (so no Html.EditorFor etc).
class keyword
I've been working on adding support for the Oxygene .Net language and
I'm running into problems because in Oxygene the class keyword is used
to declare anonymous types.
I think something like this should be valid
<html>
<head><title></title></head>
<body>
<a href="${Url.Action('Detail','P ost',new class (Id =
Re: Binding
similar to the above with the ThemeDescriptorFilter, so now it won't
cache the view when I want to use the theme bindings :) Some hacks as
ControllerContext isn't passed in to GetBindings that I still need to
resolve.
I'm not sure just passing the viewPath would be enough, as that
Re: Newbie question about using spark productively
Thanks for confirming that the recompilation isn't necessary. I will
go through the examples and make sure everything is working fine. The
only thing I can think about is if you guys are using some kind of a
Managed File watcher extension which is incompatible with Mono, then
it can be fixed on either end.
RE: Binding
If you wanted to vary the bindings per view file you could also pass the path along as an argument to the binding provider... Starting around ViewLoader.cs line 147 where it calls FindBinding() you could add a string viewPath argument along down to the IBindingProvider.GetBindings call.
MVC 2 Areas could not work
I've tried use Areas future of MVC 2 in my web.But when I changed the
view engine to Spark, the Areas could not work. It thrown some
problems like 'can not find resources'.
===
My web application with Areas:Samples, Controller: Home, Action:Index.
Here is some codes below.
Code of Controller:
Re: Binding
binding files. Seems you want static binding files, however I'm
excited more about the possibility of dynamic binding files that are
bound depending on context such as the current theme.
Having what you want should be straightforward, just
Re: Newbie question about using spark productively
To my knowledge you shouldn't have to recompile every time you change a
spark file, but I haven't tried out the bits on Mono in a long time - glad
to hear it's working though.
The tooling is definitely something that can be improved overall and it's
something I'm spending as much time as I can on. Of course, Visual Studio is
Re: Binding
Last week I posted the link to the samples source code download on my blog
as an update:
[link]
Regards,
Rob
Newbie question about using spark productively
I've been using Spark mixed in with my MVC2 views for a week now. I
would really appreciate it if you can share any productivity advice
you have gained. I specifically have a couple of small questions
(Please note I'm running Spark with Mono on Linux, it works
surprisingly well though):
1. I don't use Visual studio. When I change something in Spark, I need
Re: Binding
used in his MVCConf presentation that has a lot of the HTML helpers
already in it?
Also, I'm wondering if it is possible (or could be) to have multiple
bindings files? I can foresee having a standard set (like the one
used in the presentation) named something like "Mvc.Bindings.xml" and
