smarty Questions

3

Solved

I'm using this code {$entry.entry|strip_tags} to strip tags, however I would just like to strip <p> tags and not all HTML tags. Can someone help? Thank you
Hedley asked 6/3, 2012 at 16:47

4

Solved

I migrated Prestashop from localhost to website domain using digitalocean, but when I open this website I get this error Fatal error: Uncaught --> Smarty: unable to write file /var/www/html/pre...
Friulian asked 24/12, 2014 at 3:54

7

Solved

In Smarty, is there a standard function or an easy way to generate json from an array, as json_encode() does in php? I could not see it in Smarty documentation, wanted to ask here.
Unbosom asked 16/8, 2009 at 22:37

5

Solved

Construction is this: <!-- projects list --> {if !empty($userObjects)} <select id="projects-list" tabindex="1" name="project"> {if !isset($selected)}<option value="0">Choose p...
Guanabara asked 27/12, 2012 at 14:49

4

I'm using the tcpdf library to generate the pdf document. I'm using smarty template engine to hold the data. Below is the script to put in the header data: // set default header data $pdf->SetH...
Sensibility asked 24/1, 2013 at 7:4

3

When User already login, i want to show some link in page <{if(!empty($_COOKIE['USER']))}> <a href="domain.com/page-a.html">TEXT A</a> <{else}> <a href="domain.com/page...
Symons asked 26/7, 2014 at 8:50

4

Solved

I'm New to Fpdf library, i need to create a pdf from data base in smarty. i have checked the data from data base is fine, when pass the font name the below error was show Warning: in_array() expe...
Eckhart asked 4/1, 2013 at 5:1

14

Solved

I have some variables inside a template and I don't know where I assigned them. I need to know what is inside a particular variable; for instance, say I have a variable in smarty called member. I t...
Epiphenomenon asked 12/3, 2010 at 9:50

2

Solved

I'm working on an old project on VSCode, and I found out that the html formatter and emmet syntax isn't working for .tpl (Smarty templating engine) files. It's inconveniencing my workflow, and unf...
Gerard asked 29/8, 2019 at 7:44

4

Solved

I would like to get all variables assigned to Smarty inside the template. For example, if I have this code $smarty->assign('name', 'Fulano'); $smarty->assign('age', '22'); $result = $this-&g...
Zitvaa asked 3/8, 2012 at 16:25

3

Solved

I would like to disable smarty-s notices. This exactly: Notice: Undefined variable: xy Because I know that some variables are undefined and in some cases I don't even want to define them. BU...
Cryoscopy asked 22/7, 2011 at 11:8

4

Solved

I'm using Smarty to pass in and display the contents of a first_name variable. Some users have Emoji characters (http://en.wikipedia.org/wiki/Emoji) in their first_name and I am wondering how I can...
Glimmer asked 30/10, 2012 at 22:46

4

Solved

I'm using Smarty template engine. I'm doing a simple login page. I set a variabile named error with a message if there are some problems, but IF NOT I get: Notice: Undefined index: error How co...
Raw asked 13/10, 2011 at 9:15

7

Solved

I have a smarty variable with html content in it like: $html="<strong>Content</strong><br/>etc etc" . I try to show it html-formatted. When showing it like {$html} only plain tex...
Defrost asked 8/5, 2013 at 20:26

5

Solved

I'm assigning an array named $enquiries_labels from php file to a smarty template file. If I print the array in PHP file it's output is as follows: Array ( [0] => New Enquiry [1] => Retail...
Gasteropod asked 7/1, 2014 at 7:26

10

I am generating php page using smarty template based on html form input and uploaded files. Using dompdf, I want to save the generated page as a pdf file. When the user submits the multipart/form-d...
Maenad asked 22/10, 2013 at 17:39

7

Solved

Very simple question, is it possible to use a smarty var inside the {php}{/php} tags. I know it's deprecated, pointless, not recommended, etc., but please, I am looking for a simple patch ! Someth...
Goulden asked 11/1, 2012 at 23:28

2

I'm trying to migrate from my old PHP 5.4.45 + Smarty 2.6.28 to my new PHP 7.2.25 + Smarty 3.1.33. I'm tuning some small pieces of code, it works in most of webpages, but suddenly it stop working ...
Braw asked 2/12, 2019 at 17:23

2

Solved

How can i get the first smarty array element ? Actually i know how to do this... but i have following issue. I get a array passed that looks like this [DATA] => Array ( [12] => Array ( ...
Edmonds asked 22/8, 2014 at 14:0

2

Solved

At the time of writing this, the smarty.net website appears to be down. Anyway, how do I replace line breaks with a space in a smarty variable? Is it something like this {$var|regex_replace:'[\\r\...
Entellus asked 21/5, 2011 at 0:27

25

Solved

Why should I use templating system in PHP? The reasoning behind my question is: PHP itself is feature rich templating system, why should I install another template engine? The only two pros...
Materially asked 12/1, 2009 at 16:37

6

I'm using NOTPAD++ and I wonder how I can highlight codes in tpl files. I googled online and there are answers but none of them works. For intance, http://sourceforge.net/p/notepad-plus/discussion...
Ardys asked 12/8, 2013 at 10:31

10

Solved

Someone wants me to redesign a site run in PHP (VideoCMS). But when I asked him to send me the source he has given me *.tpl files instead of *.php. There is some code inside them: {include file='he...
Aerialist asked 27/11, 2009 at 11:48

3

Solved

I am new to smarty. I want to know how to remove all white-space characters from a given string in Smarty? I have a string like "this is my string". The output should be "thisismystring". How c...
Waterer asked 7/9, 2012 at 11:15

1

Solved

What's the opposite of contains in Shopify Liquid Smarty tags? I basically want to hide products from Search page that has the tag hideme Example code : {% if product.tags contains 'hideme' %}. I...
Bartholomeus asked 20/3, 2019 at 22:17

© 2022 - 2024 — McMap. All rights reserved.