templating Questions

2

Im trying to pass an array of objects into a partial as an argument: {{> partial [{title: "hello", year: "2015"}, {title: "hello2" year: "2015"}] }} and then on the partial: <div> {{...
Shastashastra asked 21/5, 2015 at 11:40

1

I'm using the stencil template language tool for swift found here: https://github.com/stencilproject/Stencil Using master branch. The Problem given the following .json file { "xcassets" : "dev...
Gynecoid asked 17/6, 2018 at 3:24

2

Is there anything like a templating engine (a la Mustache.js) that can do templating in "reverse"? That means that I provide rendered html and a template file, run it through the engine, and get ...
Wickiup asked 11/8, 2013 at 4:20

6

Solved

I am leveraging handlebars.js for my templating engine and am looking to make a conditional segment display only if it is the last item in array contained in the templates configuration object. { ...
Hege asked 13/7, 2012 at 22:18

8

Solved

I have a PHP function that I'm using to output a standard block of HTML. It currently looks like this: <?php function TestBlockHTML ($replStr) { ?> <html> <body><h1> &lt...
Japheth asked 9/2, 2009 at 14:52

12

Solved

I need to send email notifications to users and I need to allow the admin to provide a template for the message body (and possibly headers, too). I'd like something like string.Format that allows ...
Madlynmadman asked 9/4, 2009 at 8:49

6

Solved

I would like to know what would be the best way to display a default value if the given value is not set. I have the following in a blade file (I can not guaranty that the key is set, it depends on...
Parasynthesis asked 2/8, 2013 at 18:9

4

Solved

This is what I want but probably can't have: Using node.js and express and maybe ejs, I would like to, while writing a regular HTML file in my client dir, server-side-include a template block of H...
Pedicle asked 4/5, 2013 at 1:18

2

Solved

I'm using pystache to render the templates. I'm getting & in the output when I render context variables having &. How can get rid of & where I need & . Same thing is happen...
Islean asked 16/1, 2016 at 16:46

2

Problem When dynamically creating ui-elements (shiny.tag, shiny.tag.list, ...), I often find it difficult to separate it from my code logic and usually end up with a convoluted mess of nested tags...
Mottle asked 13/11, 2019 at 18:39

1

Solved

I am trying to create a bash script in a jinja template. I have the following line: SOME_ARRAY_COUNT=${#SOME_ARRAY[@]} But it throws an error: AnsibleError: template error while templating str...
Barlow asked 13/11, 2019 at 21:0

2

Solved

I'm just learning django's templating system and trying to do something relatively trivial: <h2>State</h2> <ul class="states"> {% for state in states %} <li class="state_elem...
Questionable asked 13/11, 2011 at 5:40

4

Solved

I was evaluating Slim as a replacement for HAML in a personal project, and it doesn't appear to handle HTML5 data attributes as gracefully as HAML. I was hoping someone may have also run into this,...
Selfregulated asked 22/9, 2013 at 19:42

2

Recently I installed Twig2.0 via Composer for PHP7.2 and when running the code I'm getting these errors, ( ! ) Fatal error: Uncaught Error: Class 'Twig_Autoloader' not found in C:\wamp64\www\php-t...
Caniff asked 26/8, 2019 at 18:52

8

Solved

I'm currently dealing with handlebars.js in an express.js application. To keep things modular, I split all my templates in partials. My problem: I couldn't find a way to pass variables through an ...
Mencius asked 17/7, 2012 at 13:15

2

Solved

Is there a way to map an array of objects in Ansible Playbook to a different array of objects? Let's say we have a source array being: arr: - value: a - value: b - value: c And what we want i...
Parahydrogen asked 18/12, 2017 at 10:1

1

Using kubectl apply -k, you can overlay Resource configs (that you have already defined). Can you create resources as well? In my specific case I want to create a local Volume for the development ...
Elsworth asked 28/4, 2019 at 12:36

5

Solved

I'm trying to use delayed_job to update a remote database via xml In my lib folder I put a file with a class that should do a render_to_text with template.xml.builder, but I get: undefined method...
Rutabaga asked 20/4, 2010 at 19:33

4

Solved

<ul class="entries"> {% for post in paginator.posts %} <li> <a href="{{ post.url }}"> <h3>{{ post.title }}</h3> <p class="blogdate">{{ post.date | date: "%d...
Galenic asked 26/7, 2013 at 20:28

4

Solved

I've done tutorial about Facelets templating. Now I've tried to create a page that isn't in same directory as the template. I've got problems with page style, because of styles are referenced wit...
Pronouncement asked 3/12, 2011 at 11:47

1

Solved

I have a register with the following contents: ok: [hostname] => { "changed": false, "msg": { "changed": true, "cmd": "cd /tmp\n ./status.sh dev", "delta": "0:00:00.023660", "end": "2018-...
Thadthaddaus asked 29/11, 2018 at 0:4

1

Solved

So I've found this in the Nunjucks docs: Function Calls If you have passed a javascript method to your template, you can call it like normal. {{ foo(1, 2, 3) }} But I can't seem to make in wo...
Strychninism asked 10/8, 2018 at 13:52

0

I am using the monaco editor in a project to help a user specify some templating. require.config({ paths: { 'vs': 'https://unpkg.com/[email protected]/min/vs' }}); window.MonacoEnviro...
Dorm asked 12/3, 2018 at 21:8

4

Solved

A lot of templating engines have a special kind of syntax that is a combination of foreach and else. Basically the else clause is executed when the foreach loop doesn't have any iterations. This ca...
Polonaise asked 19/10, 2011 at 10:48

2

Solved

I am attempting to use data from 2 different sources, but render them on the same HTML page using EJS, JS and node. This is what I am trying.. app.set('view engine', 'ejs'); app.get('/', function(...
Annalisaannalise asked 17/5, 2016 at 22:39

© 2022 - 2024 — McMap. All rights reserved.