nvelocity

Modifying Cruise Control.NET

We are investigating using CruiseControl.NET as both a Continues Integration build provider, as well as automating the first part of our deployment process. Has anyone modified CruiseControl.NET's dashboard to add custom login and user roles (IE, Separate out access to forcing a build to only certain individuals on a per project basis? ...

Has anyone got NVelocity working with ASP.NET MVC Preview 5?

I'm guessing I need to implement an NVelocityViewEngine and NVelocityView - but before I do I wanted to check to see if anyone has already done this. I can't see anything in the trunk for MVCContrib. I've already seen the post below - I'm looking specifically for something which works with Preview 5: Testing ScottGu: Alternate View ...

Problem with NVelocity, foreach and two Lists

Hi, is there an easy way to solve the following problem. Let's say I fetch a IList with some books in my controller from my model. Now I want to enrich the output and fetch a preview from Amazon with another model from an outside framework and get another IList. Now I put both ILists into a property bag. In NVelocity I use a #foreach...

Completely overwriting a file with Velocity / NVelocity

I am trying to use NVelocity templates in a .Net application: using a template to output results to a file. It all seems to work fine except for the fact that the output is never fully overwritten. If my file is 100 characters long and the template only renders 20 characters, the last 80 characters are never altered! Code sample: Fi...

How do I pass a String into a function in an NVelocity Template?

I'm using the NVelocity Templating engine to produce a fixed-length field output - you know the kind of thing: Field Start Pos Field Length Notes ---------- --------- ------------ --------- Supplier 1 7 Leading Zeros GRN 8 9 - ... e.g. >0001234 123A< The probl...

Why can't i use NVelocity with the Asp.net MVC Beta?

I have added the required assemblies and registered the NVelocityViewFactory in global.asax.cs page but when i run the site i get the following error Could not load file or assembly 'Microsoft.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. Any help...

Does NVelocity no longer support string templates?

We have a bunch of NVelocity templates in embedded resources that we use for emails. We want to move these templates to the DB so they can be configured easily by users. It seems though that NVelocity (Castle port) doesn't support strings as templates. Does anyone know how to do it. To be clear this is what I want to do (syntax may be...

GetLocalResourceObject with NVelocity

How can I load a .resx file with GetLocalResourceObject when using NVelocity? I'm using ASP.NET MVC with mvccontrib nvelocity viewengine and sharp-architechture. I've hardcoded every possible virtualpath I could think of (eg. ~/Home/index.vm.resx) but everyone fails. I've also tried with ExpressionBuilderContext. ...

How can you get NVelocity to initialize correctly?

I can't get NVelocity to initialize. I'm not trying to do anything complicated, so it's just fine if it initializes at the defaults, but it won't even do that. This: VelocityEngine velocity = new VelocityEngine(); ExtendedProperties props = new ExtendedProperties(); velocity.Init(props); Results in: "It appears that no class was spe...

Is the NVelocity project dead? Are there alternatives?

I'm looking for a template engine for .NET/C# to generate email notifications in my application. I read about NVelocity in the past and think it would fit my needs, but it seems this project is dead. Would you still recommended to use NVelocity for that purpose or can you suggest any alternatives? Note: I found some other templating en...

Is it possible to default to quiet references in NVelocity?

I'm using NVelocity to build an email message. Rather than mark every reference as quiet ($!name instead of $name), I'd like to default to quiet references. Is it possible? ...

MasterPage/ContentPage with NVelocity and ASP.NET MVC?

I am a big fan of NVelocity. I think its terse syntax is a huge boon, and helps keep my views simple and effective. I have begun using the NVelocity view engine from the Mvc Contrib project for ASP.NET MVC, along with the Castle NVelocity .vm syntax highlighter. While I love what NVelocity brings to the table, I am really missing one f...

Castle Nvelocity - Getting started.

Im trying to follow this guide: http://www.castleproject.org/others/nvelocity/usingit.html Can you tell me what dlls I have to include to get his working: VelocityEngine velocity = new VelocityEngine(); ExtendedProperties props = new ExtendedProperties(); velocity.Init(props); I included the whole castle project and that still didn...

What's the nvelocity/C# equivalent of "if x in array" ?

Hacking on a Nvelocity C#/.NET view template (.cs file), I'm really missing the Python keyword "in" (as in, "foo in list"). What is the built-in for checking list/array membership? This is what my Python brain wants to do: #set ( $ignore = ['a','b','c'] ) <ul> #foreach ( $f in $blah ) #if ( $f not in $ignore ) <li> $f </li> #en...

asp mvc with nvelocity?

I am trying use NVelocity with ASP.NET MVC, but I am having difficulty navigating the noise of out-of-date information. There are many broken links, incorrect info, etc. Is there a guide or howto that works with the current MVC and NVelocity API and distribution mechanisms? Tia, -neil ...

NVelocity -- #parse with embedded resources

I'm generating emails based off embedded NVelocity templates and would like to do something with dynamically included sections. So my embedded resources are something like this: DigestMail.vm _Document.vm _ActionItem.vm _Event.vm My email routine will get a list of objects and will pass each of these along with the proper view to Dige...

Castle Nvelocity GetTemplate method won't work

I've been trying to follow this instructions to implement email templating using NVelocity but I keep getting a resource not found exception from the GetTemplate method. I've used Server.MapPath full routes and also relative routes and haven't been able to make it work. ...

How to use NVelocity without embedding the templates as resources?

I've been playing around with NVelocity to create a library that loads mail templates. And I haven't been able to load a template without embedding it into the application assembly. Is there a special way of doing this? Properties to be specified? I've tried several string formatting tweaks to get the path of the template and keep getti...

How to handle XSS on NVelocity

Castle Project is full of features, includes some awesome subprojects, and developing with it has been a pleasure. My team is almost ready to deliver a custom made EAM and we are polishing our system. We tried some basic XSS attacks and guess: They all worked. Even though it will be running in a Intranet environment, we wouldn't like u...

NVelocity - Displaying money value...

I have an object - call this "order" This object has a property - Total. This is type - decimal (it's a money value) In my template i have something like: Order Total: $order.Total GBP However, in the resulting merge, it comes out as: Order Total: 3.4000 GBP for 3.40 Is there any way of telling nvelocity to format it as 2 ...