template-engine Questions

4

Solved

The variable in Python : names = ["a", "b"] What I write currently in Jinja2 template: c({{ names | join(",") }}) What I get using the template above: c(a, b) However, what I really need i...
Ker asked 20/3, 2013 at 2:45

4

Solved

my use-case is the following : I'm composing an HTML page by using parts that are valid HTML fragments but not valid pages, like Divs; these elements are using CSS to manage their style. I'd like t...
Worsham asked 5/1, 2011 at 16:45

3

Solved

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?
Butterfish asked 14/10, 2009 at 15:59

9

I'm thinking about creating syntax highlighter for it, but I don't know the conventional abbreviation for this specific type of template.
Demicanton asked 7/3, 2014 at 15:22

6

I'm wondering how to load a template from it's full path (like FILE constant give). Actually you have to set a "root" path for template like this : require_once '/path/to/lib/Twig/Autoloader.php'...
Barimah asked 15/8, 2011 at 12:31

5

I'm looking for a library or command line script that will allow me to create custom templates that I can generate from the command line. The ruby on rails scaffolding generator is almost identical...
Lambart asked 20/9, 2011 at 20:25

5

Solved

I am currently making a small module for NodeJs. For which I need a small help. I will tell it like this. I have a variable with string. It contains a string html value. Now I need to replace $(ti...
Bourke asked 11/1, 2016 at 15:24

4

Solved

I have a comments AJAX call which returns data of the posted comment, I also have @mention functionality built in, the server side is processing the @mentions and doing a str_replace on the mention...
Betimes asked 25/4, 2015 at 13:51

8

Solved

Is there a standard or at least widespread implementation of something like String.format, but with named arguments? I'd like to format a templatized string in a way like that: Map<String, Obj...
Innocency asked 29/6, 2012 at 15:3

15

Solved

I want to use the Django template engine in my (Python) code, but I'm not building a Django-based web site. How do I use it without having a settings.py file (and others) and having to set the DJAN...
Konstantin asked 18/9, 2008 at 23:55

9

In Handlebars, say I have a collection of names. How can I do {{#each names}} {{position}} {{name}} {{/each}} where {{position}} is 1 for the first name, 2 for the second name, etc.? Do I absolute...

2

Solved

I have a template with placeholders(e.x. ${PARAM1}), the program successfully resolves them. But what to do if I want to resolve only placeholders which I pass to template engine and leave other ${...
Aubine asked 17/5, 2017 at 12:39

3

Solved

Freemaker templates render variables with the following syntax: ${name} Javascript ES6 template strings have a similar syntax ${name} The problem is that when freemarker runs on the server, it wi...
Generative asked 11/5, 2017 at 5:29

5

Solved

I have a little problem understanding what an expression like {{ something.render() | safe }} does . From what I have seen, without the safe keyword it outputs the entire html document, not just t...
Cadre asked 9/9, 2012 at 17:58

4

Solved

I want my Java App to read a String from a User, the String may contains some tags, for example : String text = " value 1 = #value1 and value 2 = #value2 "; int[] intArray = new int[] {4,5}; Al...
Podophyllin asked 29/8, 2014 at 8:19

16

Solved

Is it possible to retrieve all variables inside a Twig template with PHP? Example someTemplate.twig.php: Hello {{ name }}, your new email is {{ email }} Now I want to do something like this: ...
Fimbriation asked 9/10, 2012 at 11:30

9

Solved

I am using velocity 1.7 and within a foreach loop I want to print the count. In the template I have the following string in a #foreach/#end section: Count: $foreach.count and was expecting to se...
Wharve asked 4/10, 2011 at 9:27

2

Solved

I'm making a Flask app for local development (on a Mac) of HTML templates that will eventually be served through ASP.NET. For the purposes of local development, I want a way to replace the conten...
Lyndonlyndsay asked 23/8, 2012 at 0:45

6

Solved

I was wondering if there is a advantage of using template strings instead of the new advanced string formatting?
Sparks asked 24/7, 2012 at 11:41

10

Solved

I have the following YAML content: paths: patha: /path/to/root/a pathb: /path/to/root/b pathc: /path/to/root/c How can I "normalise" this, by removing /path/to/root/ from the three pa...
Drool asked 14/1, 2010 at 11:1

12

Solved

I have to create conf files and init.d which are very similar. These files permit to deploy new HTTP service on my servers. These files are the same and only some parameters change from one file to...
Midkiff asked 2/6, 2011 at 12:52

3

Solved

At our company we love to write django driven applications and we also love to use react. Recently we thought about writing a component based templating engine for python where templates can be wri...
Mellott asked 12/6, 2019 at 13:57

15

Solved

Is there a truncate modifier for the blade templates in Laravel, pretty much like Smarty? I know I could just write out the actual php in the template but i'm looking for something a little nicer ...
Cthrine asked 21/2, 2013 at 21:38

2

Solved

I'm following the official Thymeleaf tutorial on its website and I'm currently on the section Executing the template engine. From what I understood, I should already be able to run the app coded so...
Penutian asked 13/2, 2020 at 13:8

5

Solved

I made a custom link tag in Liquid and I am trying to be able to pass liquid variables into the call for that tag like so {{ assign id = 'something' }} // this value is actual dynamic while loopin...
Indefinable asked 27/10, 2011 at 17:6

© 2022 - 2025 — McMap. All rights reserved.