First  |  Prev |  Next  |  Last
Pages: 1 2 3 4 5
sintax problem
hi, I have a config file with several values like: menu_test1 = 'test1' menu_test2 = 'test2' menu_test3 = 'test3' and I'm passing a variable to the template like: assign('page' => 'test1'); and I want to retrieve the value of one of those config variables based on this $page variable. I've already... 10 Oct 2007 08:09
Newline being inserted after plugin
I created a smarty function called {link_to_template} that creates a URL designed to go inside a <a href=""> - for example: <a href="{link_to_template param1=xyz}">Blah</a> This creates a cache php file with the following: <a href="<?php echo smarty_function_link_to_template(array('param1' => 'xyz'), $this)... 10 Oct 2007 10:29
force compile and caching
I am little confused about the optimum settings for force_compile and caching in a production environment as described in this paragraph: From the manual->[force_compile] forces Smarty to (re)compile templates on every invocation. This setting overrides $compile_check. By default this is FALSE. This is handy for de... 5 Oct 2007 11:01
date formatting
hello, in my template I have an input field which contains the date a shelf expires. <input type="text" name="{$shelf_expire.name}" value="{$shelf_expire_value}" class="bg{$shelf_expire.farbe}" size="{$shelf_expire.breite}" {$shelf_expire.readstatus} /> Given the value for $shelf_expire_value is 2099-12-... 5 Oct 2007 03:55
Working with arrays recursively
I know you can set up nested {foreach} blocks in the template but that only works if you know that the array you are working with has a predefined number of levels. Is there a way to set up a block so that you can work with the array recursively? So no matter how many levels the array has, your smarty block can h... 31 Aug 2007 23:46
{include} questions
From the docs: "All assigned variable values are restored after the scope of the included template is left. This means you can use all variables from the including template inside the included template. But changes to variables inside the included template are not visible inside the including template after the... 23 Aug 2007 13:42
Cat modified update
I've a problem with the cat modifier I would to append a string only if the "main" string is not empty... {$string|cat:" - "} don't work then I modified the plugin link as following.... some comments? <?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty cat ... 22 Aug 2007 06:08
Curly braces inside a function argument
How can put curly braces inside of a function argument? Is it not possible? everything I've tried doesn't seem to work: {myfunc test="foo {bar}"} {myfunc test='foo {bar}'} {myfunc test="foo {ldelim}bar{rdelim}"} No matter what, smarty always percieves the first closing brace as the closing brace for the fun... 22 Aug 2007 12:38
Conditional
I use a lightbox effect on my G2 site (which uses Smarty). When this lightbox effect is called, i want to display only certain stuff. How would i write this using smarty? Thanks for any help Chris ... 21 Aug 2007 17:43
Best way to build site with different type of users
Hi all, I need some suggest, advice, information that help me in a right way: I want to build a site that have different type of users, like for example "admin" and "normal user". I've a form for the authentication, when the username and password are validated I will display the right section/panel. In fi... 20 Aug 2007 11:01
First  |  Prev |  Next  |  Last
Pages: 1 2 3 4 5