Questions tagged [templating]

Templating systems are generally composed of a Template Engine, a Content Resource and a Template Resource.

A templating system is composed of:

  • A template engine: the primary processing element of the system;
  • Content resource: any of various kinds of input data streams, such as from a relational database, XML files, JSON, LDAP directory, and other kinds of local or networked data;
  • Template resource: web templates specified according to a template language; The template and content resources are processed and combined by the template engine to mass-produce web documents. For purposes of this article, web documents include any of various output formats for transmission over the web via HTTP, or another internet protocol.
958 questions
-1
votes
2 answers

Transform ansible yml files "with vars templating" to yml files "without templating"

I have this yml files inside an ansible project with templating and vars : custom_values: postgresql: postgresqlDatabase: "{{ secrets.db_name }}" postgresqlPassword: "{{ secrets.postgres_password }}" I search a solution to…
DevOpsAddict
  • 61
  • 2
  • 6
-1
votes
1 answer

Using the item variable in a template lookup in a loop

I am trying hard to iterate with_subelements and use the item.0.id INSIDE the template file which is loaded via lookup('template',...). It seems as if the variable is not available during templating. # data: grafana_app_data: pKWGOV9mk: …
eventhorizon
  • 2,977
  • 8
  • 33
  • 57
-1
votes
1 answer

Securely instantiate PHP class from URL get parameter?

I've written a little code-snippet that should instantiate a php class based on a get-parameter. (Code edited based on the suggestions from @sietse85 and @CBroe:) $this->pageVal = preg_replace('/[^A-Za-z]/', '', filter_input(INPUT_GET, 'page')) ?…
user7059778
-1
votes
1 answer

How to make and use a template in HTML without a framework

If I was going to make a quiz, in which all of the questions needed to have the same format, and the user has to only be shown 1 question at a time, how would I do this without copying and pasting the code? Could I make a template? That would be my…
Benjamin Sommer
  • 1,058
  • 3
  • 15
  • 35
-1
votes
1 answer

How to pass a php variable to a twig template

I am using twig for the first time and I want to pass a variable to the template, So How I can pass a new template variable? I want to add something like : {{ Total_project }} This variable is a return for a function that count the projects and…
Mohdows
  • 61
  • 8
-1
votes
3 answers

Template string from regex

Let's say that I have the following URL path: /api/resource/:id Given the context object {id: 1} the path will be transformed to /api/resource/1. Now I want to build a more complex path template: /api/resource/:id(/relationships/:name)? Here the…
Spack
  • 464
  • 4
  • 22
-1
votes
1 answer

Pass variables to template

im using NodeJS/Expressjs and I have this route: router.post({ var value = req.body.value; //I NEED TO DO SOMETHING LIKE var file = '../test/test.js'; file.render(value); }); and /test/test.js looks like var myVar = {value1}; var…
mdv
  • 925
  • 3
  • 14
  • 28
-1
votes
1 answer

Golang templating does not work properly

I have an if else block in my template. when else if is true it is rendered always empty as if else or else if is not there here is my template in this case, it renders nothing And also I am using text/template because html/template send the…
nikoss
  • 3,254
  • 2
  • 26
  • 40
-1
votes
1 answer

Express not rendering Nunjucks properly

I am not sure if this is an issue with express or wether I am doing something wrong with nunjucks. I want to create a template hierarchy where template contains all the commons parts and specific pages extend template. For some reason the body field…
-1
votes
1 answer

AngularJS change font-style

I'm trying to change the font-style of an element when a variable is true. In my controller, there's a variable which returns its value. Now I want to change the font-style based on the return value. This should happen via ng-style. Already searched…
user6495062
  • 11
  • 1
  • 1
-1
votes
1 answer

User Managed Templating for Custom Message in Laravel

I am in the process of creating a WebApp in Laravel where the registered business users will be able to send out automated emails to their customers with the help of all the data stored in the app. The App is a sort of CRM. But for creating the…
Maharshi Raval
  • 168
  • 2
  • 10
-1
votes
2 answers

NoReverseMatch ... and keyword arguments '{}' not found. 0 pattern(s) tried: []

I'm new to django. I've tried the tutorial so many times. I now have started my own project until I am faced with NoReverseMatch ... and keyword arguments '{}' not found. 0 pattern(s) tried: [] my template section_list.html {% for section in…
sandish
  • 39
  • 1
  • 6
-1
votes
1 answer

Place a block of HTML above the Megamenu in Joomla! 3.4.0 Purity_III template

I need to place a block of HTML above the Megamenu. This block of HTML occupies the whole horizontal space above the Megamenu. I am using Joomla! 3.4.0 and the Purity_III template. Anyone here can please tell how this can be done?
Sofia Reis
  • 23
  • 1
  • 4
-1
votes
2 answers

dynamic view injection or routing

i have a JSF projekt and in there i have different views, which are backed by ManagedBeans. What i would like to achieve is to change some views while others stay where they are. this has to happen dynamically. In other words. I want to inject and…
arkhon
  • 765
  • 2
  • 11
  • 28
-1
votes
1 answer

Advise on creating the most simple PHP Templating/frameworks

Let say i'm creating simple cms website using php which contain less than 10 pages. Eg: index.php, products.php, faq.php, buy.php, contact.php, etc. And i guess the best crawl for search engine is by creating the html templating or frameworks.…
user3613026
  • 191
  • 1
  • 16
1 2 3
63
64