Questions tagged [soy-templates]

Soy or Closure Templates is a client- and server-side templating system to dynamically construct reusable HTML and UI components. See https://github.com/google/closure-templates

Soy or Closure Templates is a client- and server-side templating system to dynamically construct reusable HTML and UI components. See https://github.com/google/closure-templates

29 questions
0
votes
1 answer

Specific which external CSS files overrides which

I'm working on a web project that uses SOY templates and SASS. For reasons, I'm not able to get SASS preprocessor to continue working it with SASS but all the CSS and SCSS files are present and I can look at them just not modify. I currently have a…
user3128376
  • 974
  • 6
  • 17
  • 40
0
votes
1 answer

How to create simple data presentation portlet for liferay 7.0?

I need to create simple data presentation portlet for new version of liferay, but can't really find the proper way. I created backend with service builder and added custom methods for listing, adding, etc. Created mvc portlet based on this tutorial…
tester.one
  • 369
  • 2
  • 6
  • 23
0
votes
1 answer

Strange behaviour involving Closure commands and "text-align:justify"

I have some divs within a Soy template that I want to be evenly spaced, horizontally. Here is what does work: CSS (nomenclature simplified for this example): .list-of-things { position: relative; text-align: justify; } .list-of-things::after { …
0
votes
1 answer

Google Closure Templates variable variables

Situation: context contains such fields as testExecutionKey1, testExecutionKey2 .. testExecutionKey10 I want to check them for null, but do it the nice way - in for loop I need to access $context.testExecutionKey1..10 inside the loop, where number…
A. Knorre
  • 134
  • 1
  • 6
0
votes
1 answer

Update value in soy template declared with let

I have one value that is tied to a flag that comes from a config file that I need to show in my soy template. It is either true or false. If true, the value needs to be "x" (for example, but it is a string) If false, the value needs to be ""…
0
votes
1 answer

How to add multiple CSS classes to HTML node in Closure template (soy)?

In a template I need to assign more than one CSS class to a div. However, when I try something like the following, the Closure compiler seems to wrap only the first class in quotation marks, resulting in the browser ignoring the rest.
0
votes
1 answer

Confluence plugin : How to put CSS markup in soy plugin?

I have a soy file that works fine, apart from the CSS style I'd like applied is ignored. I suspect the CSS file is not imported into the page when loaded. This is the line I have, the css-style is called 'urlwidth'
jeff porter
  • 6,560
  • 13
  • 65
  • 123
0
votes
1 answer

JSZip in Jive theme

Has anyone had any success in implementing JSZip within their Jive theme? I am having trouble instantiating the JSZip object. Here is the setup: I have a Jive theme that has some custom JS files within a script folder. The JS files are included via…
Pião
  • 1
0
votes
1 answer

how to get substring in soy template?

I have soy template in which I want only 28 character if the length is more than 30 characters? how to get that? {if $attributes.subAccountNumber.length < 30} {$attributes.subAccountNumber} {else} …
Karthik Amar
  • 217
  • 5
  • 17
0
votes
1 answer

How do I exact value from an object for soy template?

We are in the process of modifying the JIRA Service Desk 3 notification soy templates to make them more useful while we wait for JSD-218 to be actioned. Primarily we are editing the issue-conversational-notifications.soy. We can easily get…
Mia
  • 23
  • 5
0
votes
1 answer

Is it possible that Google Soy template library has problems with xml?

I am attempting to build an XML document using Soy and get the following error: com.google.template.soy.parsepasses.contextautoesc.SoyAutoescapeException: In file C:\Users\jeff\workspaceEMC\PAC\target\classes\templates\XML_template.soy:33:24,…
Jeff
  • 1,513
  • 4
  • 18
  • 34
0
votes
1 answer

Multiple conditions for IF in Soy Template

I am using SOY V2 Templates in a project and have a need to use multiple conditions in an IF statement. I have been searching for a couple of hours and haven't found anything. Essentially I want to duplicate: if (value !== null and value > 0) I have…
0
votes
1 answer

Is it possible to reuse code from atlassian's stash *.soy

Is it possible to reuse code from atlassian's stash *.soy? I need to add a button on the login page of Stash's login.soy. After some research I have come to know that we can rewrite .soy using soyTemplateRenderer but no luck. Can you explain me how…
Ashwani Verma
  • 39
  • 1
  • 11
0
votes
1 answer

Closure disable URL substitution with autoescape=strict

I am rendering a soy template using Closure for a chrome extension and am having trouble inserting chrome-extension://* links since they are being filtered by soy.$$filterNormalizeUri While normally it would be undesirable to allow…
1
2