template-engine

Velocity: hide methods from template

Is there a way I can mark a public method as "not callable from a velocity template". ...

C#: Form templating system

I want to create a form templating system in a c# winforms application. Admins could create and manage forms whereas users could fill them out (Like in Lotus Notes or Access). This needs to be in a user control. I've been playing with solutions such as XSL and possibly dynamically creating HTML, but these seem pretty ghetto. Is there a m...

C# template engine

Hi! I am looking for a stand-alone, easy to use from C# code, template engine. What I want to do is create an html and xml files with placeholders for data, and fill them with data from my code. The engine needs to support loops (duplicating parts of the template form more that one object) and conditions (add parts of the template to th...

Useful velocity gadgets

There are lots of interesting JSP tag libraries. I wanted to know what good Velocity gadgets or libraries or resusable components are out there. Please one per answer. ...

jinja2: get loop index of outer loop

In jinja, the variable loop.index holds the iteration number of the current running loop. When I have nested loops, how can I get in the inner loop the current iteration of an outer loop? ...

Is the RainTPL template engine good?

Hi my great friends, I'm searching for a small Templates Engine for a small site and I found RainTPL 1.7.1 and I want your opinion on it. Can I use it or do you think its not fast and not that good? ...

Plugable Email Templating solution for C#

Is anyone aware of a plugable Email Templating solution for C#? I've grown weary of having to roll my own each project and I imagine there are more robust solutions out there. It should support HTML/non-HTML and allow for tokens (e.g. USERNAME is replaced with a configurable value). ...

Can I use T4 programmatically from C# ?

I am writing software that produces C# code. Mostly I am using StringTemplate and StringBuilder. Is there any way to use T4 templates direct from my code? ...

PHP Smarty - Get a list of all the variables in a template?

I'm using Smarty and PHP. If I have a template (either as a file or as a string), is there some way to get smarty to parse that file/string and return an array with all the smarty variables in that template? e.g.: I want something like this: $mystring = "Hello {$name}. How are you on this fine {$dayofweek} morning"; $vars = $smarty->ma...

Grails: what are the other alternatives to sitemesh for gsp view layouts?

Sitemesh seems to be an open-source project with minimal activity and small user community. So, I was wondering whether there are (better) alternatives to sitemesh, as a templating layout engine ? And if it is the case, how can one integrate it into a grails application? Thank you, Fabien. ...

What's the most Pythonic XHTML/HTML parser/generator/template module that supports DOM like access?

It should be able to create, modify and read X/HTML in a highly object oriented way that still feels DOM like but is not obese, and is really Pythonic. Preferably it would deal with malformed HTML too, but we can skip this for templates. For example, I'd like to do this: >> from someAmazingTemplate import * >> html = Template('<html><h...

How to use the John Resig JavaScript Micro-Templating engine?

I have searched for a bit on a basic example on using the John Resig JavaScript Micro-Templating engine on google but came out dry. I decided to bring it to base guys. Can anyone help with a simple example on using this engine? I have never used a client side template engine before. Update: This is the complete html document. Thanks to...

Python for web scripting

I'm just starting out with Python and have practiced so far in the IDLE interface. Now I'd like to configure Python with MAMP so I can start creating really basic webapps — using Python inside HTML, or well, vice-versa. (I'm assuming HTML is allowed in Python, just like PHP? If not, are there any modules/template engines for that?) What...

Is there a template engine for Node.js?

I'm kind of falling in love with Node.js not because you write app code in javascript but because of its performance. I really don't care a lot about how beautiful a server side language might be but how much requests per second it can handle. So anyway I'm looking forward to experiment building an entire webapp using Node.js (and goi...

More descriptive Language String placeholder?

<?LANG(no_download, 'you are not allowed to download') instead of $lang[no_download] I have what I think is a better approach for embedding language strings in templates. In almost all the PHP applications, the predominant language placeholder format is like <?=$lang['no_download']?> or {{no_download}}. Other designers/developers/t...

non-servlet JSP

I realise there are EL and near EL frameworks like StringTemplate, JUEL, Velocity, etc. However, I am not asking for list of alternatives to JSTL/EL. I came across a package more than a year ago, someone who wrote a util that emulates the functionality of JSP for non-servlet env, i.e., JSP composition which does not need a "servlet cont...

How do I reference a choice list in django template?

Hi guys, I have the following in my django model: PRIORITY = ( (1, 'Low'), (2, 'Normal'), (3, 'High'), ) Obviously the entry associated with this is storing the integer. In my template however I would like to show the priority in human-readable format. How exactly do I accomplish this? My template: {% for x in items %...

Is it there a Ruby equivalent of Java's Wicket ?

The idea would be to replace ERB with templates that are pure XHTML and that the view would be pure code manipulating the template content. Have this been done already ? ...

Template engines

Are there any for purposes other than web? e.g. for use in script generators, c++ code generators or other related, generic operations. Thanks, B ...

in velocity can you iterate through a java hashmap's entry set() ?

Can you do something like this in a velocity template? #set ($map = $myobject.getMap() ) #foreach ($mapEntry in $map.entrySet()) <name>$mapEntry.key()</name> <value>$mapEntry.value()</value> #end ...