Hi everyone, I'hv got a problem when I am using foreach in smarty,
an array with 2 item was loop in a foreach, but the result is it loop 3 time.
I use doctrine to get a list of review by a user from database
Doctrine_Core::getTable('review')->findByUser($userId);
then I assign it to smarty and loop in foreach:
{foreach from=$r...
I have an array in my template files ($data) witch looks like this
$data.1.name
$data.1.date
$data.1.place
$data.2.name
$data.2.date
$data.2.place
$data.3.name
$data.3.date
$data.3.place
now I would like to check the entire array and remove an item where the date is older then today.
The date check i figured out but i'm stuck at remov...
Hi Friends,
I am working with Social Engine which is based on Zend Framework and Smarty Templates.
I need to make custom functionality for profile page, where I need Ajax based Dynamic Country / State / City selections like
Dropdown for Country -> on selection of some country, State will display belonging to selected country and Stat...
I need to read for example last 3 items of an array in smarty.
Please advice.
...
I'm using Smarty_parser.php and it works well when when I use the parser by itself or if I run the parser then a view call. For example:
public function act() {
@$this->load->library('smarty_parser');
$data = array('Someinfo');
$this->smarty_parser->parse('contentTmpls/act.tpl', $data);
// Load Footer
$this->load->vi...
I have a multi-dimensional array generated in PHP:
array(
'Requirements' => array(
'export_requirements' => array('value'=> 1, 'label'=> 'Export'),
'add_requirements' => array('value'=> 2, 'label'=> 'Add'),
'add_private_requirements' => array('value'=> 4, 'label'=> 'Add Private...
hello,
i want to pass parameter along with my add action.that is if owner in menu item is clicked then "is_owner" should by default get set otherwise reset..along with "add" want to send one more parameter and access it in view.this is request dispatcher..
$router->map('Company', 'Company', array('controller' => 'companies', 'action' =...
I tried this way,but seems not working:
{if $i == 1}
$value = $recommend[3];
{/if}
Does smarty support assignment operation?
...
Seems by default smarty eats up all errors(even nothing in php's log):
{$value|nosuchapi}
How to make it output error info when it calls an function that doesn't exist?
...
this is a handler for building menu
new MenuItem('Owner', lang('Owner'), assemble_url('Owner'), get_image_url('navigation/Company.gif')),
new MenuItem('Client', lang('Client'), assemble_url('Client'), get_image_url('navigation/people.gif')),
One system module class in which i've mapped the route
$router->map('Owner', 'Owner','nu...
Can someone provide an example that make it clear?
...
<ul>
{foreach from=$recommend item=value}
<li><span><em>{$value['content']}</em></span></li>
{/foreach}
</ul>
<ul>
{foreach from=$recommend item=value}
<li><h4>{$value['name']}</h4></li>
{/foreach}
</ul>
The above html can be generated by 1 loop if not using smarty:
$html1 = $html2 = '<ul>';
foreach($recommend as $value)
{
$html1 ...
I have a working dynamic content query/echo file that I need to convert to template for use with domPDF. Would someone look at my code that's not executing to see where I'm going wrong?
(Btw, the sendPDF.tpl file is in path: /Smarty/mg/templates/ -- sendPDF.php is in /Smarty/mg/ and smartyTEST.php is in my root path)
thanks much
Allen ...
Hi all,
I developed a project using PHP as FRONT END and MYSQL as BACKEND using SMARTY FRAMEWORK.
In my localhost the site is working perfectly. But in server it doesn't load.
Here is the URL : http://utovglobal.com/new_mandapam/
I give permissions to all the folders. Even it didn't work.
Any suggestions or help will be thankful an...
Not much knowledge about Javcascript beyond using it for some Dynamic HTML. Now I'm venturing a bit into Ajax ground and have a problem with the following code (borrowed from
http://kpumuk.info/php/ajax-enabled-smarty-plugins-part-2-ajax_form/ and edited to fit my needs).
How can I pass the update_id parameter to the obSubmit function?
...