smarty

Smarty outputs blank page

SOLVED: Error in template file I have Smarty setup like this: require_once 'smarty/Smarty.class.php'; $smarty = new Smarty(); $smarty->compile_dir = $compile_dir; $smarty->template_dir = $tpl_dir; That's all I should need for now... I have Smarty setup exactly like this for another site and it works just fine on the same server. va...

Communicating to Flash via Jquery on a Smarty site (doesn't work) need help

I'm trying to start my animation from an html button via jquery, but it just refuses to work. I'm using the following jquery flash plugin: http://jquery.lukelutman.com/plugins/flash/ I've made the same function work on a non-Smarty site, so I'm thinking it has to do with that or something having to do with the all the extra markup on t...

PHPDocumentor date problem warnings

I'm having some issues getting phpdoc to run correctly. The docs are being generated for the most part successfully, but I get the following warning many times: Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() funct...

Smarty data upper limit

I am using Smarty to create a table from a big data set (so it can be loaded as excel file) but the table html code get truncated in the middle. What is the upper limited of data feed to Smarty and how can I set it? ...

smarty select option

hi, how to add new option and the value is none on smarty? <select> {foreach from=$miles item=row1} {html_options values=$row1.milestone_id output=$row1.title} {/foreach} </select> ...

smarty pagination for nested {section}

Here is the Sample Code: {section name="firstlevel" loop=$xxx} <ul> {section name="secondlevel" loop=$xxx[firstlevel]} <li>$xxx[firstlevel][secondlevel].values</li> {/section} </ul> {sectionelse} No values {/section} {if $smarty.section.firstleve...

do things with the return value of smarty function?

We have this Smarty function that returns HTML code for templates. However it is also possible that the function returns a null string, which we now wish to identify. Our system has been running stably for years, so I am looking for the least invasive possible solution. Is it possible to assign the return value to a smarty variable? I h...

How do I recursively nest smarty {foreach} loops while still being able to use {$smarty.foreach.<loopName>.first/last}?

I have a Smarty template file in which I'm looping over hierarchical data represented by nested arrays. The child data is represented exactly the same way as the parent data, so I wanted to recursively {include} the Smarty template to render this: Source of "my.tpl": {foreach from=$children item="child" name="childrenLoop"} {* dis...

Understanding Smarty and MVC Frameworks

Hello there, I just created this thread to discuss with people who have adopted the smarty system, and how many time it took to you to understand it, because i just can't get the idea, instead of making every easier as everybody says i think it just make more complex to code. More than a problem with only smarty is with the whole MVC m...

smarty send query

in .php while ($line = mysql_fetch_assoc($result)){ $value[] = $line; $value['newvalue'] ='223457'; } $smarty->assign('view', $value); in .tpl {section name=i loop=$view} {$view[i].newvalue} {/section} no output for newvalue.im newbie in smarty ...

How can i make record style in following format in smarty template

hi i want to list the records in following format in smarty template page 1 3 5 ... 2 4 6 ... there should be the ul li 1 2 in this format ...

Break in Smarty's / Dwoo's foreach

About break foreach ( $data as $k => $v ) { if ( $k == 4 ) { break; } } every one knows. Is there something similar in Smarty's or Dwoo's {foreach} function ? ...

Several copies of a PHP site with tweaks: maximize code reuse and minimize duplication?

Sorry for the confusing title.... We are developing an application to be used by multiple companies. For the most part, the application is the same, your standard sort of database manipulation pages (search pages, edit pages, etc.) customized for the data that it is designed for. However, each company has a slightly different process, ...

Dynamic variable names in Smarty

I want to be access some variables I've assigned dynamically from PHP in Smarty, here is an example: $content_name = 'body' $smarty->assign('content_name',$content_name); $smarty->assign($content_name.'_title',$title); $smarty->assign($content_name.'_body',$body); // assigned values // $content_name = home // $home_title = $title // $h...

smarty Debugging Console

how to view Debugging Console not in popup window? prefer in same window. any idea? ...

google map and smarty

map.setCenter(new GLatLng("{$news[news].long2 }", 101.74), 13); whats wrong with this ? ...

Concatenation string with variable in smarty

Hi! I need in smarty template to transmit to function concatenated string constant with variable value, How can i do it? some example code: {$obj->calledFunc('string const').$var} but . operator doesn't work ...

Pass php object to smarty

I have an issue with passing an object to smarty tag. I have the following code: $contact = new Contacts; $smarty = new Smarty; $smarty->assign('contact',$contact); In test.htpl : <html> <head> <title>{$title}</title> </head> <body> id: {$contact->id} <br/> name: {$contact->name} <br/> email: {$contact->email} <br/> ...

Add more output smarty html option

{html_options values=$row.milestone_id output=$row.title output=$row.title} hi folks,how to add more $output in smarty html option ? ...

If I am using CAKEphp do I need to use smartytemplates too?

If I am using CAKEphp do I need to use smartytemplates too? ...