Questions tagged as 'smarty'

1
answer

Pass parameter to template with Smarty

I'm reading the documentation for Smarty but I still can not understand how I can and can pass parameter to a template using Smarty . I have this snippet of code: if ($part == PagePart::RecordCard && ($mode == PageMode:...
asked by 09.04.2018 / 16:43
1
answer

Better performance / performance: Smarty, Twig or some other? [closed]

While in general PHP systems are used for other purposes, such as separating business rules, etc. Which one provides the best performance for website load / performance? Currently, which of these offers the biggest advantage at this point, a...
asked by 20.08.2015 / 15:42
1
answer

How to format date variable in Smarty for dd / mm / YYYY

I am trying to format a date in Smarty which is in this {$Grid.Row.DataEmissao.DisplayValue} format being displayed like this: 15-03-2018 , how can I format it to 15/03/2018 to display in my report, even read on some d...
asked by 21.03.2018 / 20:30
2
answers

How to rewrite the initial array and remove items by ID in the smarty view?

I'm using the View rendering library with Smarty . In my view, I have an output with the array of product information inside a foreach: {assign var='remove_products' [712, 716, 717, 718, 719, 720, 745, 755, 758]} {foreach from=$product...
asked by 08.12.2015 / 19:42
1
answer

Multiple identical forms Dwoo

I have a form built using Template Engine Dwoo which has three variables (specific data for the attributes "name" and "value"), this form will be inserted multiple times inside another template but since the name of the variable mu...
asked by 12.07.2015 / 01:06
0
answers

How to do foreach with Smarty using Key

I'm doing a query on my BD to mount a relationship with some NF numbers and their respective dates, but the result is being the last record, there being three. What I've done so far: // BUSCANDO DADOS DA AUTORIZAÇÃO $this->Ge...
asked by 23.08.2018 / 14:58
0
answers

Installing a new theme in the Prestashop store 1.4.3

I installed a theme using the export / import theme module, as shown in this video : and now I'm getting this message in the header:    Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template' /...
asked by 17.12.2015 / 18:09
1
answer

Error with php tag on smarty

I'm having a question regarding the template engine smarty 3.1, I'm trying to use the {php} tags in the templates and I'm getting the following error:    Fatal error: Uncaught - > Smarty Compiler: Syntax error in template "file: /var/www/h...
asked by 18.03.2018 / 23:46
1
answer

Format table date mysql and show in Smarty

I'm developing a page in PHP, using MVC structure and rendering the tamplete files with Smarty. However, you have been struggling to get a date via MySQL (see the format: YEAR-MONTH-DAY HOUR: MINUTE: SECOND I'd like it to appear in the fol...
asked by 16.10.2016 / 05:30
0
answers

Database query within a Smarty template

Is it possible to query my BD within a template Smarty ? I already have the variable available that will enable my query, but the tests I did, I did not, I already did a file that does the search and makes the template call, but als...
asked by 01.08.2018 / 14:09