Questions tagged [nvelocity]

NVelocity is a port of the Apache Jakarta Velocity project. It is a simple, easy to learn and extensible template engine.

NVelocity is a port of the Apache Jakarta Velocity project. It is a simple, easy to learn and extensible template engine.

99 questions
0
votes
2 answers

Syntax Highlighting with NVelocity in Castle MonoRails

I'm working with Castle Monorails and NVelocity as a view engine. The syntax highlighting works when I go to Tools > Options > Text Editor > File Extension and add "vm" to "HTML Editor" on Editor Experience. Here's the exception: When a file does…
olemarius
  • 1,124
  • 4
  • 17
  • 27
0
votes
1 answer

How to populate Castle FormHelper RadioField with an enum property

I am trying to work with enums as properies in my models, as decribed in this Castle Monorail page But I am having some problems when populating a a radio button with that property. I am using this nvelocity syntax in my…
0
votes
2 answers

Is unparsed content supported in nVelocity

When reading the VTL reference for Velocity 1.7 at the bottom of the doc there was a reference to Unparsed content. Unparsed content is rendered at runtime, but is not parsed or interpreted. Example: #[[ This has invalid syntax that would normally…
Gabriel B
  • 3
  • 2
0
votes
4 answers

Can I programmatically append tags to from within body in Castle MonoRails / NVelocity?

I've been trying to find a way to programmatically add a link to an external CSS file to the tag from markup within the tag in Castle MonoRails and NVelocity view engine. Anyone know how this can be done? I need to resolve this problem…
olemarius
  • 1,124
  • 4
  • 17
  • 27
0
votes
1 answer

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)…
bondehagen
  • 890
  • 1
  • 8
  • 11
0
votes
1 answer

How to store different view in a single Microsoft Word document?

I would like to create an application that allow users to add user-readable text in word document and at the back end maintain complex text (syntax) like MergeField or Velocity code. e.g. Simple text: Hello Mr. Bob. Complex syntax: Hello…
Akhil
  • 11
  • 4
0
votes
2 answers

NVelocity extension method ASP.NET webform

I was wondering if it's possible to use an extension method with asp.net webforms and nvelocity. I would like to set some defaults if the string value is null or empty. Example of .vm file: Example of my email body... Billable Status:…
dm80
  • 1,228
  • 5
  • 20
  • 38
0
votes
1 answer

how to use NVelocity from asp.net webforms?

I want to use "NVelocity" from plain ASPX pages without using any MVC framework. I don't want to use "NVelocity View Engine" thru' asp.net MVC framework. The only example that I got for "NVelocity" is for merging and writing onto console window…
CleanBold
  • 1,551
  • 1
  • 14
  • 37
0
votes
1 answer

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,…
suhair
  • 10,895
  • 11
  • 52
  • 63
0
votes
2 answers

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 …
Andrew
  • 12,991
  • 15
  • 55
  • 85
0
votes
1 answer

Best way to iterate Dictionary> in NVelocity

I have a C# Dictionary>, and I am trying to display the data with nVelocity template and also I am trying to get the keys of the dictionary with an index. I am newbie. Please help me with how to access keys with an…
0
votes
1 answer

ASP.NET WebForms Placeholder for NVelocity View Engine

Is there any way to use placeholder similar to WebForms in NVelocity View Engine (.vm files)? Today I've got a component containing everything for the , but I wish to specify additional tags from each view page like it can easily be done in…
olemarius
  • 1,124
  • 4
  • 17
  • 27
0
votes
1 answer

How to configure log of nvelocity?

NVelocity seems to be creating a nvelocity.log in the root or our website. Apparently it is using log4net, but it is not using our current log4net configuration because our logs are in another folder. How can we change the location of the…
Dzyann
  • 5,062
  • 11
  • 63
  • 95
0
votes
1 answer

Nvelocity - Create a random number

Working on a project where I simply need to generate a random number using NVelocity in a page without editing the code behind C#. I'm new to NVelocity and I've looked all over the interwebs but cant't find the answer. Any help is…
GeekInTheBox
  • 139
  • 2
  • 11
0
votes
1 answer

escaping a " in NVelocity

how can I escape " in NVelocity ? e.g. test.message = "136# 1/4" Test Test Test" if I do it displays : 136# 1/4 if I do
devmet
  • 3
  • 3