1,645 questions
0
votes
1
answer
53
views
gorazor: Can't find layout
For go i want to use the gorazor template engine.
I used code from gorazor repository and from go template benchmark and ran gorazor tpl tpl and got panic: Can't find layout: rzrexmpl/tpl/layout/base [...
0
votes
1
answer
44
views
Jekyll recursive include causing "Nesting too deep" error when rendering nested comments
I'm working on a Jekyll site and encountering a "Nesting too deep" error when trying to render nested comments using a recursive include. Here's a simplified version of my template:
{% ...
0
votes
0
answers
43
views
Compile and test classes generated by Maven template engine project
My Maven project is a template engine that generates some java classes from user input data (provided as a json file). It is simply composed of a top level module (myproject-parent, type pom) and a ...
0
votes
0
answers
210
views
NestJS: Instance of INestApplication does not have setBaseViewsDir?
I would just like to set up a template engine locally, as my workflow now is rendering the tempalte and having to go to my aws-s3 bucket to see the results.
In the NestJS docs the hace an example ...
2
votes
1
answer
521
views
Best way to automatically add CSRF Token to Spring Boot JTE main template
I like the new template engine JTE and I am trying to learn this.
I know I can manually add the CSRF token as a request attribute and I have done it for my login form like so:
@GetMapping("/login&...
-2
votes
1
answer
33
views
Thymeleaf each loop with checkbox tags not checking values
i went over the internet and i can't find solution so maybe more eyes can help.
I have form for charity donation. It uses thymeleaf templating engine.
I passed needed objects to the view using Model ...
1
vote
1
answer
77
views
Absolute prevention of content pollution in output buffer
I have this following code that basically renders partials. However I was trying to find a way to prevent polluting $templatePath variable into the template (the variable is currently accessible from ...
-2
votes
1
answer
98
views
Go template: Can't use HTML tag inside range block
I have a Go project use GoFiber and html template engine. When I give an array to range block in .html file, if between {{range .}} and {{end}} has no HTML tag, it runs. But when I add some, it seems ...
0
votes
1
answer
103
views
How to escape colon in the attribute key with Thymeleaf
I want to generate the following entry in .xml file with Thymeleaf
<postalCode xsi:type="extPL:adxp.postalCode"> </postalCode>
to do so, I have the following template:
<...
0
votes
0
answers
190
views
Freemarker template not found exception in Quarkus
After followed the official documentation and others tutorials, when I run my quarkus 3.6.4 app I get the error:
2024-01-12 10:02:11,412 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-...
1
vote
1
answer
204
views
Passing Pug variables from child template for use in parent template block
I'm working on a project that utilizes the Pug template engine. All my Pug files (layout.pug, head.pug, index.pug, etc.) are stored within a folder named pug. In my layout.pug file, I've established ...
1
vote
0
answers
58
views
Thymeleaf Template Processing Exception: Neither BindingResult nor plain target object available as request attribute
Question: I'm encountering an issue with Thymeleaf while trying to bind a form field to an object in my Spring Boot application. I'm receiving the following error message:
org.thymeleaf.exceptions....
0
votes
1
answer
75
views
Pug cannot find installed Highlight.js JSTransformer filter
The documentation says I just have to install the filters via npm in order to use them.
If you want to be able to use filters in your Pug template, you would first make sure that these features are ...
2
votes
1
answer
826
views
Is it safe to use python str.format method with user-submitted templates in server-side?
I am working on project where users must be able to submit templates containing placeholders to be later rendered to generate dynamic content.
For example, a user might submit a template like:
"${...
0
votes
1
answer
46
views
A lack of line breaks in browser's source view using html-express-js template engine
I am not experienced in express js template engines and I tried to choose a simple one from the list https://expressjs.com/en/resources/template-engines.html
I chose html-express-js that is on GH: ...
-1
votes
2
answers
256
views
nodejs without template engines? [closed]
I just started learning backend development and I decided to start with node js. I figured out express js and routing a bit. This question came to my mind. Is there a way to send data directly to ...
1
vote
1
answer
233
views
Template Tool kit - Subtract days from a given date in the template
First, I don't have access to the code I have to try to do this on the template.
I have a date that will be available on the template [%UserDate%]
I need to subtract 120 days from the provided [%...
1
vote
1
answer
116
views
Jinja2 cannot read a template file with a particular full path
Normally, jinja2 render_template method asks a string of a full path of html.
I do as the format below but it still raise the error.
render_template('/var/www/xyz/template/_base_front.html', {"...
1
vote
1
answer
167
views
Mail template from TemplateEngine does not read html tags
I have the following template:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<meta ...
0
votes
1
answer
144
views
How do I set a variable equal to another variable in an Apps Script scriplet?
I just started learning Apps Script. I can't seem to be able to set iAsString to i which was declared inside of the scriptlet for loop. I've made a new html document and narrowed down that when I add ...
0
votes
1
answer
773
views
How to pull data from Google Sheets to HTML table
I'm trying to adapt this model. It is an HTML table that retrieves data from a Google table. However, I need the search to be done in a specific column. In this model, the search is performed in any ...
0
votes
1
answer
88
views
How do I refer to a Google form record when using HTML template in App Script?
Is it possible to add namedValues in a scriptlet when trying to use HTML template to send mails in App Script? If yes, how please, if no, how can I refer to each question on a Google form using ...
0
votes
0
answers
408
views
Click button in email to populate google sheet
I'm stuck I have done something similar before and it worked but this time round I keep getting a "Sorry, unable to open the file at present." error message.
I want to send an email to a ...
1
vote
2
answers
147
views
How to save handlebar registry for future use
I'm using the handlebars temlate engine. The handlebar registry is initialized as usual:
let mut registry = Handlebars::new();
and I want to save this handlebar registry as a member of a struct for ...
0
votes
1
answer
175
views
Images not showing in pug template
I have put the images folder inside the views folder and added the relative path to the images but the images are not loading on the html page. I have tried multiple options like putting the folder ...
1
vote
1
answer
621
views
Issue with Gofiber framework template
I am in the process of learning fiber framework in GO language and having trouble figure out why the template engine is returning an error when the body section is an include. The following works as ...
0
votes
2
answers
3k
views
Golang Fiber template engine HTML: render: template does not exist
On my Ubuntu 22.10 digitalocean server, I'm experimenting with Golang and Fiber and the html template engine. Loving it so far.
It all works, including the Mysql connection and sending email. Except ...
0
votes
1
answer
33
views
Django, how to display separate html blocks, which can then be edited in one place
I need to display the navbar, footer, main, base, title - in separate blocks, which can then be edited in one place, and the changes will occur everywhere
Сan you give me an idea how to do it, I have ...
0
votes
1
answer
112
views
Add query string to a Google Webapp URL
//htmlFileName: String
function createTemplate(htmlFileName) {
let {protocol,stdName} = getProtocolData()
let params = protocol // protocol: String, exemple 987654321
let url = 'https://...
0
votes
1
answer
463
views
Getting HTML to work in a google scripts email system
So, I am trying to get an automatic system set up for my store where it notifies the relevant people that a bike needs building so that we don't forget about any as it does occasionally happen as a ...
0
votes
2
answers
169
views
Referencing HTML scriplet in google apps script [duplicate]
I can't figure out an elementary mistake. When I run the following script the output I get is: <?= head1 ?> <?= head2 ?>
.
I'm trying to make head1 and head2 printing scriptlets where ...
-4
votes
1
answer
128
views
Dynamically pulling data from sheet to a sidebar [closed]
I am trying to retrieve data from another sheet (within the same spreadsheet) and display it as a dropdown option in the sidebar.
My code.gs has function called getVisualData() which correctly returns ...
0
votes
1
answer
226
views
cloudinary multiple file upload error nodejs
I am trying to do a multiple file upload using Cloudinary, but for some reason, it only picks the last file I upload and not all 4 of the files, it returns only one file in the array.
Here are the ...
0
votes
1
answer
154
views
Why do variables for HTML template have to be defined outside its own function? [duplicate]
I am just curious as to why/how this works.
I have a function called sendEmail that defines a bunch of variables from a spreadsheet then sends the user an email using said variables. However, I get ...
0
votes
1
answer
1k
views
Update scriptlets in HTML without reloading page
I am referring to this article about templated HTML and scriptlets with Google Apps Script:
https://developers.google.com/apps-script/guides/html/templates
It is written how to call an Apps Script ...
0
votes
1
answer
74
views
How come my forEach loop gets error when sending emails
I am sure the answer is staring at me right in the face but I'm a bit confused. I have a spreadsheet with employee information and I created a forEach loop (below) so that at the end of each row it ...
0
votes
1
answer
1k
views
Passing HTML to HTML template
I know that if we want to pass variables from .gs to the HTML template, we do this:
On .html (using <?= someVariable ?>:
<div>
<table id="summary">
<thead>
...
0
votes
1
answer
411
views
FreeMarker template not detected in Spring Boot
I`m trying to build an app with spring boot using freemarker as template engine.
I am using Gradle.
This is the @RestController class
@RestController
public class CodeController {
private ...
0
votes
1
answer
404
views
condition for detecting string value in C++ template engine library inja (for SQL insertion of NULL)
using the C++ template engine library
https://github.com/pantor/inja
In SQL I can INSERT a row in a database with a VARCHAR SQL type column named 'col1' with
std::string my_template = "INSERT ...
2
votes
0
answers
584
views
Why is my ejs outputting the actual html code and not rendering it as html?
I am doing some simple validation on a form and using bootstrap for alert dismissing. I have an ejs partial for displaying error messages. When trying to render the error message its just showing the ...
0
votes
1
answer
382
views
Getting mako exception while using include tag in mako template
I am trying to use <%include /> tag in mako template, but getting exception. I have all the files in the same directory. Can someone help me figure out what am I missing here?
$cat sample1.py
...
0
votes
1
answer
424
views
I am having a problem to convert the following Ejs to pug
I am having a problem to convert the following Ejs to pug
in admin/edit-product.ejs
we can make changes with product already we have it
but But I want to transfer ejs to pug
any solutions
<form ...
1
vote
2
answers
2k
views
variable is undefined on ejs file
Im having a little problem on one proyect, Im using ejs as a template engine and expressjs as server framework, so the problem come when Im validating that the user data were correct and I pass a ...
0
votes
2
answers
2k
views
Cannot find module 'hbs', Handlebars template engine
I don't know why it gives this error. I have also set view engine to hbs using app.set(), also defined path of views (path is correct, no error there). But it still says cannot find module hbs (it is ...
0
votes
1
answer
453
views
Highlighting the inner code blocks in Django Template Engine with django-pygmentify
I'm using django-pygmentify package in order to highlight my code blocks in my Django templates. The thing is that this package only supports code blocks as input. I have a model field that keeps ...
0
votes
0
answers
75
views
Is it valid and safe to use eval/Function/new Function to create an HTML template engine in Node.js?
I have the following function that creates HTML from a string, within this string, which uses the syntax "$ {variable}" to add dynamic content, thus, this string is passed to the Function in ...
4
votes
2
answers
4k
views
Are template engines (i.e. Thymeleaf) necessary for Spring Boot applications?
I am currently working on a Spring Boot project and I am fairly new to template engines. This will also be my first own private project with Spring Boot.
I would like to know whether it is necessary ...
0
votes
2
answers
3k
views
If i specify app.engine in express, do i need to app.set view engine also?
I'm learning Node.js and at template topic right now. First i used only EJS and configured app.set('view engine', 'ejs') for it to work properly. Next to create layout i installed ejs-mate and added ...
0
votes
0
answers
233
views
Getting a blank page when navigating between GAS web pages
I am building a multipage web app using GAS.
The actual URLs for the pages of my app are generated by my GAS and passed via the data variable to my html template.
A scriptlet is inserting the URL into ...
3
votes
2
answers
4k
views
How to render django html templates as plain text?
Is there any mechanism in django to render html as plain text. For example render the following:
<h1>Title</h1>
<p>Paragraph</p>
As:
Title
Paragraph
Specially for attaching ...