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.
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...
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...
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...
4
Solved
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...
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...
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...
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...
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...
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...
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...
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...
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...
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 ...
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
(
...
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\...
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...
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...
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...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.