Questions tagged [mustache]
Mustache is a "logic-less" templating language available in a range of languages.
1,950
questions
0
votes
0
answers
38
views
Search template mustache issue
I have an issue with my search template in ES 8.11,
It appears that there is data on the docName parameter, but there is no data when I search using the fulltext parameter and the docName parameter.
...
0
votes
0
answers
10
views
Drafting an Elastic Search Template via Elastic Console
Im totally new to the whole elastic search thingy so bare with me;
I've created an index (my-search-index) which has the following document structure :
Field
Type
item_code
String
item_name
String
...
-1
votes
0
answers
22
views
converting mustache to ejs
This is snip from my ejs code, from home.html
app.engine('html', require('ejs').renderFile);
app.set('view engine', 'html');
And my engine looks like this
<form class="form-inline w-75 mt-2 ...
0
votes
1
answer
29
views
Comma issues in mustache conditional block elasticsearch
I'm building a search template with mustache for elasticsearch with a bool query but I've got issues with my conditional block
I've code this part of the template :
\"must\":[
...
0
votes
1
answer
48
views
Get menu items as data
I am facing an issue while creating a new MediaWiki Skin. I am following the steps mentioned at Manual:How to make a MediaWiki skin#Rendering menus with Mustache. As per documentation, for showing the ...
0
votes
0
answers
24
views
Handlebar function use with dot notation
I am using Handlebars library in my Spring Boot application , and i have a question regarding function call in template
Currently i know that handlebar support function call in Polish Notation , like ...
0
votes
0
answers
33
views
How to modify dataClass.mustache and corresponding swagger.yaml file
I want to generate model classes in kotlin-spring.
I have a specific structure defined for which I want to generate the data classes using mustache template and swagger file.
data class Student (
val ...
1
vote
1
answer
71
views
How to change to pascal case in Mustache templates?
I have a mustache template like:
{{#attributes}}
func (event {{fileNameRoot}}) Get{{Name}}() string {
return event.{{Name}}
}
{{/attributes}}
which outputs:
func (event JustATest) GetuserName() ...
1
vote
0
answers
38
views
Trouble with mustache-sharp multiplying empty lines
I have this template in mustache-sharp:
Good Day,
{{#newline}}
The following asset has been retired by {{Actor}}:
{{#newline}}
{{AssetNumber}}: {{AssetDescription}}
Date retirement: {{DateRetired:dd....
1
vote
1
answer
22
views
Rendering an Array via Mustache
So I've got some data
{"facility":[{"ID":"A1A123","Name":" Anytown Health Centre PHCY","RegionID":1}]}
And I'd like to render it using a ...
1
vote
1
answer
58
views
How to integrate mustache templating into TinyMCE without having HTML wrappers put around Mustache Code
We are using TinyMCE (6) as a WYSIWYG Editor so our users can enter in HTML content into Templates that we will use later.
We are injecting certain variables, using the Mustache Templating Library, ...
-1
votes
1
answer
14
views
Is any posability to make mustache query (or use existed script) in hibernate?
I have saved script in opensearch cluste. Is it possible to call it somehow via hibernate-search or make something like "native query" with mustache script?
0
votes
1
answer
145
views
How to load a Mustache Template in Spring Boot with includes
I have a simple test template TestMail.mustache:
<html lang="de">
{{>header}}
<body>
<p>bla bla bla bla</p>
<p>more bla bla.</p>
</body>
</...
0
votes
0
answers
68
views
GET http://localhost:8080/index.js net::ERR_ABORTED 404
I couldnt find solution for my issue. I'm following book Learning Spring Boot 3.0 - Third Edition. Im at chapter 2, but struggle to get everything to work properly.
Im using mustache and try to load ...
0
votes
1
answer
22
views
How do I dynamically update a <span> element depending on which radio button is currently active?
A mustache page in my web app displays all of a users desk bookings and allows them to select one using radio buttons. I'd like for a message displayed within span tags on the same page to be ...
0
votes
1
answer
20
views
ElasticSearch template mustahce
I am trying to iterate through a multidimensional param in an ElasticSearch Mustache template, but my code is not working. Given the following Elastic query with param att:
GET my_idx/_search/template
...
0
votes
0
answers
38
views
How to iterate multidimensional array in mustache?
If have the this multidimensional array :
"arr" : [
{"code":"glove", "arr1": [{ "value":"fingers"}, {"value":"hands",&...
1
vote
0
answers
50
views
How to put a conditionnal in a scope on mustachio for postmark template
Hello I can't find a solution for this problem I have a template like this (all my trads are manage with balises like this in my template):
{{french}}Bonjour{{/french}}{{english}}Hello{{/english}}
I ...
0
votes
1
answer
28
views
How to connect controller and mustache?
Having problem with sending infprmation to localhost. Using http://localhost:8080 occurs an Whitelabel Error Page (This application has no explicit mapping for /error, so you are seeing this as a ...
1
vote
1
answer
44
views
Mustache curly braces being moved out of table element within <template> HTML
The HTML5 template element seems to mangle Mustache curly braces in the HTML output, particularly within a table:
<template id="test">
<table>
{{#foo}}
<tr&...
1
vote
2
answers
436
views
How to call a PHP function from Moodle mustache template?
I am trying to build a filter function via dropdown menus for courses inside a Moodle block plugin. From what I've learned, the way to go would be to
Use select element in template
Handle select ...
0
votes
1
answer
31
views
How do I include an if statement in a mustache file?
My app allows users to create and edit goals. In the 'createGoal' mustache file, a select box allows the user to choose 1 of 3 goal categories:
`<label for="category">Category</...
0
votes
1
answer
145
views
Passing a dynamic list of doubles as param value in ElasticSearch templates
I am trying to pass an array of doubles to an ElasticSearch template using the below mustache template
PUT _scripts/my_template
{
"script": {
"lang": "mustache",
...
0
votes
1
answer
44
views
bind attribute in custom event
In Sugarcrm (backbone.js) I am trying to get custom attribute (user_id) from List (in .hbs file)
<div class='dropdown usersLegend'>
<ul class='dropdown-menu'></ul>
...
0
votes
1
answer
114
views
In python chevron, how do I create a list of objects using templates without chevron automatically url quoting the content?
I have 2 chevron templates:
datatemplate:
<div>
<li>"this is data": {{ data }}<\li>
</div>
listdata:
<ul>
{{ datalists }}
</ul>
I do this to generate a ...
0
votes
0
answers
48
views
TinyMCE inserting child with valid_children in table not working
we use TinyMCE in combination with JMustache. Users can insert mustache variables into the text from TinyMCE to create a template.
We now have a problem with loops in combination with tables. The loop ...
0
votes
0
answers
51
views
Validating mustache templates using schemata
we're having multiple Moodle templates and which sometimes overwrite some mustache files of the plugins. The problem we're now facing is that when we change something in an underlying plugin, it ...
0
votes
1
answer
375
views
ElasticSearch : Is it possible to loop with mustache in a ElasticSearchTemplate
In an ElasticSearch Template , I would like to to that :
"aggs": {
"att_characteristic": {
"filters": {
"filters": {
...
0
votes
0
answers
50
views
How to use Mustache with javax.mail spring boot to send an email
After a long research I found an example of sending an email using mustache and javax.mail but I don't know why spring boot doesnt read the html inside .mustache file. anyone please
My Controller:
@...
0
votes
0
answers
135
views
Mustache JS Template Not Displaying
I'm working with mustache js for the first time, this is the challenge i'm facing
here is mustache js code
//jquery linking
<script src="../jquery-tut/node_modules/jquery.js"></...
0
votes
1
answer
50
views
Find & Replace python script
I have a python script to change the syntax of an html file. To be specific, I want to convert the html file from mandrill syntax to mustache syntax. The script I currently have works well with ...
1
vote
1
answer
136
views
Mustache.js render function returning empty string for page rendered using Chevron
I have the following code to display a webpage using Mustache templating (simplified for clarity)
<!doctype html>
<html lang="en" data-theme="dark">
<head>
&...
-1
votes
1
answer
88
views
Node.js Version of InnerHTML
I'm trying to loop through some items and create HTML to pass through to the view file:
const itemWrap = '<div id="items"></div>';
userDetails.notes.forEach(item => {
...
0
votes
0
answers
52
views
mustache template to convert data to array list format
I want to use this data in Elasticsearch query, so I want the data should be in this format ["a", "b"]
I want to use this in terms query as shown below
GET /_search
{
"query&...
1
vote
1
answer
180
views
Is it possible to disable escaping globally with mustache java?
I am using Mustache Java to template regular text files and would like to disable any escaping done to the resource / the interpolated values.
For example, this java code:
var mustache = new ...
0
votes
1
answer
62
views
Rendering an image from a MongoDB database using a mustache template
I am having issues in displaying the image on my "item.hjs" page. I think that the issue is the conversion in base64 from the database.
This is how I am rendering the information from the ...
1
vote
2
answers
869
views
How to make custom Enum template using [email protected]
I have global installation of @openapitools/[email protected] and as additional property I use enumPropertyNaming=UPPERCASE
The --addittional-properties, given by documentation https://...
1
vote
1
answer
217
views
Mustache templating, how can I return an array of strings?
I'm currently trying to do mustache templating on the following json:
{
"jsonMessage": {
"errorFileLocations": [
"File1",
"File2"
]
}
}
...
1
vote
0
answers
2k
views
Migrating Swagger-code-gen to openapi-generator-maven-plugin with Mustache: Illegal start of expression ',', ')', or '[' expected
Greetings human beings.
I'm trying to migrate application with a several of other libaries from Java 11, Spring-Boot 2.7.x to Java 17, Spring-Boot 3 We also need to migrate swagger-codegen-maven-...
0
votes
1
answer
635
views
OpenApi Genrator Import conflicts with Generated model and the library org.springframework.http.ResponseEntity. 'single-type-import' error
I have a schema named 'ResponseEntity'. The model class gets generated with the same name.
This conflicts with the ResponseEntiy class of Springframework and gives an error
error: a type with the same ...
1
vote
1
answer
134
views
DOMPurify changing Mustache-Template-Structure
I am trying to sanitize an user-submitted template by using DOMPurify. This template is using the mustache-syntax to embed variables etc. The sanitizing itself works without issue, but Mustache-...
2
votes
1
answer
147
views
Adding extra information in Spring Rest-Docs using Attributes failing
I'm generating documentation for APIs that are written in Python. I am using Spring Rest-Docs for this which works flawless.
Now I must add a list of roles that are authorized to call the API to each ...
1
vote
1
answer
52
views
Only Create Table when it has rows of data
If I have a simple table:
<table>
<TR><TH>First Name</TH><TH>Last Name</TH></TR>
<TR><TD>John</TD><TD>Smith</TD></TR>
<...
0
votes
1
answer
55
views
Mustache: Serializer for class 'MustacheContent' is not found
I'm trying to do a project using Ktor and Mustache (amongst other things). However, when I tried templating with Mustache, following this tutorial, I get the following error:
500: kotlinx....
1
vote
1
answer
100
views
How to prevent "Too many dynamic script compilations within" error with search templates?
I use a search template with "mustache" language to build dynamic queries according to different parameters.
When I often modify the values of the parameters of this request, I get this ...
1
vote
1
answer
18
views
Previously added image in the dom start showing the spinner when new image is added
I have this simple app where I am showing images and also can add more. So when I add an image I show a spinner while it loads and then hide the spinner when its done loading. But the issue is when I'...
0
votes
0
answers
59
views
HTML templates(mustache style using double curly brackets) cause bad highlighting in VS Code, especially when using "import"
I often use handlebars/mustache like templating with HTML extensions to get proper highlighting in VS Code, but there is an issue where the highlighting becomes strange under certain conditions.
Why ...
0
votes
2
answers
225
views
Kibana: how to convert {{date}} in not UTC format
Elastic/kibana. I created a alert rule and try to use {{date}} (or {{context.date}}) in my emails.
Right now I am getting the date and time in UTC format like this: 2023-02-01T08:30:59.069Z
How to ...
0
votes
0
answers
185
views
Mustache - Postmark email conditional formatting
I am trying to conditionally render a block of HTML, dependent on the presence of a key in the JSON -> custom_invite_text.
My understanding is that the Mustachio conditions control the presence of ...
1
vote
1
answer
115
views
Use a Mustache template from a Maven dependency
I have several user-facing, Java microservices that render screens via Mustache templates. I also have a self-made Maven library which - among other things - holds a cookie banner Mustache template.
...