Questions tagged [Smarty] (131)

1
answer

How to remove blank lines created by Smarty?

Below is the part of the code which creates the pdf with customer information. It works, but if some value (for example parish or state) is empty, then it creates empty row in the document. 1) First example{sle n=c p=receiver/contact} {foreach from=$c item=i name=contacts} {gv c=$i p=person/name} {gv c=$i p=organization/nam...
maye_Bahringer asked April 4th 20 at 13:23
1
answer

Why not display the values in the template in tickle?

Hello, please tell me why do I not display the values from database to the template?getCategories_M function() { $get_cat = $db->fetchRow("select * from `classes_categories_lang`"); while($row = $db->fetchAssoc($get_cat)) { $id = $row['id']; $name = $row['name']; } }$c = new categories(); $get_cat = $c->getCate...
susanna.Bradt asked April 3rd 20 at 18:20
1
answer

How to add a specific block from a specific page?

Good afternoon. There are 2 pages:/user/cart But from these pages you can get to page 1 /order. How to add block into the page /order, if the person came from a page /user. Tried went like this:if($_SERVER['HTTP_REFERER'] == "/user"){ echo "came from the account"; } else if ($_SERVER['HTTP_REFERER'] == "/cart") { echo "W...
Gabe_Nicolas asked April 3rd 20 at 18:11
0
answer

How to use multiple case when pressing the button a few?

Good day, have a form sort on the website:if(!empty($filter['sort'])) { switch ($filter['sort']) { // Available case 'in_cat_stock': $order = "(SELECT 1 FROM __variants pv WHERE pv.product_id=p.id AND pv.price>0 AND (pv.stock>0) LIMIT 1) DESC"; break; case 'in_cat_stock_desc': $order = "(SELECT 1 FROM __variants...
Jayde_Lockman asked April 3rd 20 at 17:29
0
answer

How to handle forms in smarty?

zdravstujte, please tell me how to handle a form in smarty template, interested in the post, look on their website found nothing
nico39 asked April 2nd 20 at 16:47
1
answer

As for smarty to write the value of the input in the database?

Hello, please tell me an example of how smarty to send via the normal input that the user entered to the table?
bernadette.Kozey asked April 2nd 20 at 15:30
0
answer

How to write to a dB value using onclick from a Smarty template?

Hello, please tell me how to make the entry in the database using the Div onclick in the template Samarti?
milo.Terry10 asked April 1st 20 at 16:54
0
answer

How to solve the problem of display template?

The bottom line is this, there is a settings file (setup_pages.php):<?php require_once 'libs/Smarty.class.php'; $smarty = new Smarty(); $smarty->template_dir = 'templates'; $smarty->compile_dir = 'templates_c'; $smarty->config_dir = 'configs'; $smarty->cache_dir = 'cache'; $sql = "SELECT * FROM posts WHER...
joyce52 asked April 1st 20 at 16:53
3
answers

How to replace Smarty space with %20 in the link?

Hello, tell me how you can here<a href="{if $settings.enable_locations && in_array($v.depending.caption1, $location_fields)}javascript:;" onclick="changeLocation('{$live_site}', '{$v.depending.caption1}|{$t.name|rawurlencode}'){else}{if $seo_settings.enable_mod_rewrite}{$constructed_url|replace:$sfield:$field_str...
Eunice asked April 1st 20 at 15:29
1
answer

As for smarty to prohibit the data output at a resolution of more than 600px?

Hello, what you can think of to Smarty not output at all in the template array if the screen resolution is more than 600px? maybe you can do something with js to determine screen size and set the value something like{if (!isset($cat)) || !$cat > (here we substitute the value (601) } {else} 0 {/if} or how to organize it?...
Shannon_Bode35 asked March 31st 20 at 20:33