Questions tagged [latte]

Latte is a template engine for PHP that compiles templates to plain optimized PHP code and provides great cache management.

Latte is a template engine.

It is intuitive, fast and secure template engine, which helps to build better websites easily.

Work perfectly with combination of Nette Framework

  • compiles templates to plain optimized PHP code. it is the first PHP
  • engine introducing content-aware escaping. it has intuitive syntax
  • and helps you to build better websites easily.

https://latte.nette.org

21 questions
4
votes
2 answers

How to debug Latte templates on PhpStorm?

Is it possible to debug Latte templates in PhpStorm in the same manner as one would debug plain PHP? The documentation says: If you are using an IDE with code stepping you can go through the generated PHP code of the template. How to do this on…
masa
  • 2,762
  • 3
  • 21
  • 32
3
votes
1 answer

Nette framework - form wizard

I am trying to create form wizard in nette 2.1.2. I've created my own component in which nette form can be injected. Then in latte template is form rendered to individual steps. However, I want to perform validation of form fields in the current…
user3124979
  • 162
  • 1
  • 9
1
vote
2 answers

How to , is it possible to escape into and use raw php in Latte templates in Nette?

How to escape into and use raw php in Latte in Nette , eg can be used for debugging and other non standard, not best practices cases , logging and what not as its not standard, and rather in edge or debugging cases perhaps obviously
FantomX1
  • 1,577
  • 2
  • 15
  • 23
1
vote
1 answer

PHP Latte - multiple block with same name

I am new to latte template engine and fiddle around with it since some days. I found a lot of nice and usefull things to make my projects easier and cleaner. But there is one thing I did not find or miss an idea how to handle it. Lets imagine my…
Makkapitew
  • 11
  • 4
1
vote
2 answers

Latte (Nette) PHP framework - disable escaping globally (automatically add "noescape")

I am using Latte framework to generate Email templates in my application. I don't need escaping in variables used in template because I use it for inline CSS styling that escaping incorrectly. To avoid escaping I need to…
Dmitry
  • 499
  • 1
  • 3
  • 19
1
vote
1 answer

VS Code - Key Bindings - my own Block comment

I am using VS Code Version: 1.40.0. for quicken up my development I would need to set my own keybinding for block comment when I am in .phtml file. I managed to get into keybindings.json, put this inside: { "key": "shift+alt+q", "command":…
1
vote
1 answer

Nette Framework - Disable Latte macros

I'm using Nette framework which comes with Latte templates. My problem starts when I have non-latte macros inside my Latte template. Of course Latte throws an exception about invalid macros. So how can I disable using Latte macros or just pass a…
jmeinlschmidt
  • 1,446
  • 2
  • 14
  • 33
1
vote
1 answer

Nette how to subtract timestamp from current date

how can i subtract number of days (timestamp|date'z') from current day (date('z')) in latte? I've tryes to use var but that does not like the formating (z).
Muhaha
  • 61
  • 5
1
vote
2 answers

Latte - call function in TPL (ideally with parameter) instead of variable

I decided to rewrite an older website that I made years ago and use templating system. I decided to use Latte, as its generating PHP files, which makes it really fast compared to systems that parse tpl every time. But I was not able to figure out,…
MiChAeLoKGB
  • 796
  • 14
  • 38
0
votes
0 answers

Is it possible to pass props from non ReactApp template (when using CDN import of React) to a ReactJS component?

I am importing ReactJS via CDN links into a huge existing PHP project (latte templates). So it is not a classic ReactApp. And I would like to play with it and see the options of React when used this way. So far pretty good. But I would like to know…
martina
  • 1
  • 2
0
votes
0 answers

Plasma KDE - How to change the icon of the "Show hidden icons" in system tray widget in the Latte panel?

Show Hidden Icons Hi. How can i change the icon of this "Show hidden icons" in system tray widget of the panel of latte-dock. Or maybe we cannot do this ?
0
votes
2 answers

How to write an unescaped javascript filter in php-latte v3

I'm basically trying to write a json_encode filter, by which I'm hoping to get a raw json object, but what I'm getting instead, is an escaped string of the json object. Expected result: {"foo":"bar"} Actual result: "{\"foo\":\"bar\"}" Right now…
Inc33
  • 1,747
  • 1
  • 20
  • 26
0
votes
1 answer

Nette - importing naja library

I have a question. I need to make some modification to our nette application (first time working with the framework). I need to import NAJA lib via FTP and by downloading code from github. I do not have access to server or console, so download via…
0
votes
1 answer

NETTE-LATTE: Include on click

I have a question. Can somebody explain me, how can I include another .latte file and send dynamic data with it? I am creating api function, where you should be able to get information about company just by writing it's name. When I click to search,…
0
votes
1 answer

Javascript, Ajax, latte and Presenter problem. Can't use GET request on file in another directory

I have a question. I was tasked to add some function to our web application. It is build on php presenter by somebody else so it's quite difficult for me to debug as I never work with this stuff. I am trying to add that feature without creating…
1
2