templating Questions

3

Solved

I need to render a shared partial which can receive a few parameters from several views, but I don't want to pass all parameters everytime. If I call the template without all parameters, I get an e...
Bering asked 15/1, 2019 at 17:4

26

Solved

I'm writing a script to automate creating configuration files for Apache and PHP for my own webserver. I don't want to use any GUIs like CPanel or ISPConfig. I have some templates of Apache and PHP...
Bespread asked 26/5, 2010 at 15:12

7

Solved

If I look at the Razor View Engine, then I see a very nice and concise syntax that is not particularly tied to generating html. So I wonder, how easy would it be to use the engine outside asp.net i...
Preform asked 2/9, 2010 at 15:58

7

I'm having trouble doing something that I think should be relatively simple drupal 8 views. I have a content type called Countries. I would like to display the 3 latest country nodes on my homepag...
Intervene asked 18/10, 2016 at 6:32

7

Is it possible to inlcude code from a svg file directly into a twig template file? Something like: {% include 'my.svg' %} that will result in: <svg viewbox=".... />
Vlf asked 8/7, 2016 at 7:38

5

Solved

I am trying to set up a site using laravel, but I'm really having trouble with basic things that the documentation just doesn't cover. In this case, I see that it says I can include one view insid...
Yorgo asked 13/2, 2014 at 12:13

2

Solved

I have a FastAPI web application using Jinja2 templates, which is working fine on localhost, but not in production. The problem is that is not generating URLs for JavaScript and other static files ...
Subaquatic asked 23/11, 2022 at 15:13

19

Solved

I want to pipe the output of a "template" file into MySQL, the file having variables like ${dbName} interspersed. What is the command line utility to replace these instances and dump the ...
Monopolize asked 6/1, 2009 at 7:0

4

Is there Natural Templating for Node.js Natural Templating (like Thymeleaf template engine) is when template page or it's part can be perfectly displayed by a browser as a prototype, without being...
Beaujolais asked 27/3, 2013 at 5:43

2

Solved

I read this documentation on python-docx-template but I'm pretty confused on the table section. Let's say I have a docx template called Template.docx. Inside the docx file i have a table that only ...
Houseboat asked 28/2, 2019 at 15:13

6

I'm using python markdown as a filter for Jinja2 to generate html. As part of that, I fill in table entries from the render input. Passing the input through the markdown filter always wraps the tex...
Sidra asked 21/3, 2013 at 18:56

4

Solved

Python's standard library has a shlex.quote function that takes a string and returns one that is guaranteed to be interpreted as that same string by Unix shells. This is achieved by putting the str...
Apperception asked 23/1, 2022 at 12:37

4

Solved

Is it possible to set global variables in a twig file, so that I can access that variables from other files, macros and blocks. For example, I want to have variables.twig file and in it set my var...
Seeger asked 10/3, 2015 at 7:42

4

I'm trying to template variables from a map inside the values.yaml into my final Kubernetes ConfigMap YAML. I've read through https://github.com/helm/helm/issues/2492 and https://helm.sh/docs/char...
Exemption asked 2/5, 2019 at 18:48

5

Solved

I'm trying to understand the use case of <template> and it's functions. Having referenced the docs, I'm still left fairly confused. Considering the following code in any.vue file: <templat...
Sequin asked 27/1, 2018 at 16:21

11

Solved

Common Lisp guys have their CL-WHO, which makes HTML templating integrated with the "main" language thus making the task easier. For those who don't know CL-WHO, it looks like this (example f...
Slacks asked 22/3, 2009 at 20:31

3

I have the following: {% if promo.monday_unavailable == 1 %} not available mondays {% elseif promo.monday_available == 1%} available mondays {% else %} available mondays from {{promo.monday_...
Tannenwald asked 8/6, 2014 at 15:34

3

Solved

import jinja2 from jinja2 import Template records = [{'a':1,'b':1, 'c':1},{'a':1,'b':1, 'c':1}, {'a':2,'b':1, 'c':1}, {'a':3,'b':1, 'c':1}] t = jinja2.Template(""" {% set record_info = dict() %...
Maroney asked 8/7, 2017 at 2:37

1

Solved

I am evaluating Kustomize as a templating solution for my Project. I want an option to replace specific key-value pairs. ports: - containerPort: 8081 resources: limits: cpu: $CPU_LIMIT memory: $M...
Goodyear asked 3/5, 2021 at 14:57

5

I need to pick a Mustache rendering engine for a Scala project of mine. Seems like the only two choices are Mustache-Java and Scalate? Are there any comparisons? Which one is the more stable/perfor...
Tannin asked 17/1, 2012 at 3:23

4

Solved

I'm having some trouble getting indexes of a items in an array from a Nunjucks {% for %} loop. The array I am targeting is simple and looks like this pages[1,2,3] And this is the Nunjucks loop {% ...
Lousy asked 23/8, 2017 at 17:23

2

Solved

New to Nunjucks and have a similar problem to here but I couldn't get my code to work. I'm trying to loop through the first 5 items in a Nunjucks loop of 14 items. So far I've found that the ...
Mcclendon asked 5/9, 2017 at 0:59

1

Solved

An error occurs when preparing the template. Who can tell you how to fix it? Variables, if necessary, can also be edited. vars: AllСountry: - "name1" - "name2" name1: - &q...
Headstone asked 23/11, 2020 at 21:54

5

Solved

i want to style my GridSplitter like adding dots on it (as found on http://msdn.microsoft.com/en-us/library/aa970265.aspx). i also want to change gridsplitter color on mouseOver, or apply Aero The...
Goliard asked 3/11, 2009 at 7:32

1

Solved

Say I have these values grafana: ... ingress: enabled: true annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: - host: chart-example.loca...
Lissa asked 9/10, 2020 at 17:2

© 2022 - 2024 — McMap. All rights reserved.