Questions tagged [smarty3]

Smarty is a template engine for PHP. It enables programmers and web-designers to implement the MVC architecture pattern. The templates created can be re-used very easily.

Smarty3 is the most up-to-date branch of Smarty template engine. It requires PHP 5.2+

Last Smarty3 version is 3.1.31 and was released on Dec 14, 2016

Links

373 questions
2
votes
1 answer

{php} is not working in latest smarty while using SmartyBC class file

I have came across my first issue and it has to deal with PHP in smarty. I read the smarty manual where it said to include the SmartyBC.class.php file instead of the regular Smarty.class.php file and i did change the default file to the BC file. I…
user7995285
2
votes
1 answer

Smarty template engine is not running foreach

the foreach method is not working properly in the smarty template engine. Can you show how it might look using a while loop // Foreach data in post array saved : add a new input in the redirection form foreach($_SESSION['POSTDATA'] as $key =>…
2
votes
2 answers

Grabbing certain values from an array in Smarty

I have been trying this for hours, If it was just PHP I would be done by now but this requires Smarty 3 so things are a little different. I am having difficulty grabbing specific keys plural from an Array. The Array looks like this Array ( [0]…
Steini Petur
  • 129
  • 1
  • 9
2
votes
3 answers

Template inheritance in Plugin on Shopware 5.2.24 doesn't work

I try the example program "Slogan of the day" on shopware 5.2.24 But the code doesn't work. In the file Bootstrap.php, I defined the 3 important functions. In the function install, the callback function "onFrontendPostDispatch" will be…
Ying Style
  • 752
  • 2
  • 7
  • 25
2
votes
1 answer

Responsive Bootstrap column fix using Smarty

I'm making a video gallery using PHP, Smarty and Bootstrap. On extra small screens it will show one column, on small screens i want to show 2 columns and beyond that i want to show 3 colums The content is dinamically generated, and because of this…
Chico3001
  • 1,853
  • 1
  • 22
  • 43
2
votes
1 answer

Smarty if statement with date & date = month > to show results

I got table from array and many amounts $$$ for different dates. Example: -08/10/2015 | Amount: 2500$ -19/10/2015 | Amount: 1000$ -20/11/2015 | Amount: 500$ -27/11/2015 | Amount: 720$ -30/12/2015 | Amount: 100$ -31/12/2015 | Amount: 250$ My current…
Acidburns
  • 131
  • 3
  • 13
2
votes
3 answers

Smarty shows errors from compiled files

I'm using Smarty3 as a template engine and every time I have a PHP warning or notice from within a template it tells me something like this: Notice: Undefined index: tab in…
Roel Jansen
  • 306
  • 2
  • 11
2
votes
1 answer

Assign Smarty variable to PHP with Smarty 3

I use a shopsystem that got updated from smarty 2 to smarty 3, which led to a list of problems on our site. The worst one is that all the Smarty variables we assigned to use them in PHP don't work anymore. A short example: {assign var=test…
Marcel Wasilewski
  • 2,519
  • 1
  • 17
  • 34
2
votes
2 answers

Smarty 3 breaks at html in javascript

Smarty 3 breaks my javascript when I put some html in a variable. My code (shortened):