Author |
Message |
Topic: assign var to var |
RGordijn
Replies: 8
Views: 9523
|
Forum: General Posted: Mon May 12, 2008 10:39 am Subject: assign var to var |
foreach is working o.k.
but i still didn't get it to work properly.
but! i got a solution that also works
<input type="text" name="value[{$k}]" value="{$value[$k] ... |
Topic: assign var to var |
RGordijn
Replies: 8
Views: 9523
|
Forum: General Posted: Sun May 11, 2008 1:31 pm Subject: assign var to var |
caching, nope. i didn't create the directory and didn;t told smarty to use it.
( while I'm typing this, I thinkin' about turning it on.. )
and debug, yes. I qoute:
I checked the values in th ... |
Topic: assign var to var |
RGordijn
Replies: 8
Views: 9523
|
Forum: General Posted: Sun May 11, 2008 1:07 pm Subject: assign var to var |
haha thats true.
I made a mistake, $lang is just a HUGE array with alle the 'language', en i got:
$lang['languages']['nl'] = 'dutch';
$lang['languages']['en'] = 'english';
So my foreach works ... |
Topic: assign var to var |
RGordijn
Replies: 8
Views: 9523
|
Forum: General Posted: Sun May 11, 2008 12:33 pm Subject: assign var to var |
u.tews,
it looks great, but i just doesn't work
if I post my form, the value's of it are automaticly assign into smarty again.
I checked the values in the debug console, so no doubt that the ... |
Topic: assign var to var |
RGordijn
Replies: 8
Views: 9523
|
Forum: General Posted: Fri May 09, 2008 6:19 pm Subject: assign var to var |
Hi!
Lets say I got an php-array:
$lang{$value_$k}">
{/foreach}
getting this result:
<input type="text" name="value_nl" value="{$value_nl}">
< ... |
Topic: smarty vars in a PHP language array |
RGordijn
Replies: 2
Views: 4804
|
Forum: General Posted: Wed Feb 27, 2008 12:28 pm Subject: smarty vars in a PHP language array |
hm. I searched the manual for that one... couldn't find the name for it...
spanks! life is better now |
Topic: smarty vars in a PHP language array |
RGordijn
Replies: 2
Views: 4804
|
Forum: General Posted: Wed Feb 27, 2008 11:31 am Subject: smarty vars in a PHP language array |
Hi,
For a project, that needs to have multiple languages, I have made a little system that includes the correct language file for the choosen language.
That language file holds an array, like:
... |
Topic: Assign php variable to smarty template |
RGordijn
Replies: 17
Views: 16155
|
Forum: General Posted: Fri Feb 08, 2008 10:59 am Subject: Assign php variable to smarty template |
php:
$theme_dir = '../project/images/site/themes';
$theme_blue = $theme_dir . '/blue';
$smarty->assign ( 'theme', $theme_blue );
$smarty->display ( 'myTemplate.tpl' );
tpl:
... |
Topic: R's Simple Smarty Calendar |
RGordijn
Replies: 2
Views: 26668
|
Forum: Tips and Tricks Posted: Fri Feb 08, 2008 10:49 am Subject: R's Simple Smarty Calendar |
Hi,
My mission for today was to create a simple calendar using smarty.
I picked some examples from the web, and this is the result:
the .php file
<?php
// smarty loading etc...
$now = ... |
Topic: a section in section |
RGordijn
Replies: 3
Views: 5035
|
Forum: General Posted: Fri Jan 25, 2008 1:29 pm Subject: a section in section |
I tested with foreach, and it worked... thanks to uh.. uh.. 'messju' at the irc
now lets rebuild some big pieces of my app...
everytime i was rebuilding an array to start nicely with 0 index.. ... |
Topic: a section in section |
RGordijn
Replies: 3
Views: 5035
|
Forum: General Posted: Fri Jan 25, 2008 11:27 am Subject: a section in section |
well, working on the problem I found out what was wrong:
my array of products was not starting at zero, but the indexes where similar to the product id. like 4,5,9
and smarty is looping through an ... |
Topic: a section in section |
RGordijn
Replies: 3
Views: 5035
|
Forum: General Posted: Fri Jan 25, 2008 10:48 am Subject: a section in section |
Hi,
In my app I use a 'big' array to display some data.
Inside that array also exists some array wich I like to display.
this is the idea:
{section name=b loop=$build}
foo: ... |
Topic: Smarty template syntax check |
RGordijn
Replies: 4
Views: 9597
|
Forum: General Posted: Fri Jan 25, 2008 10:37 am Subject: Smarty template syntax check |
the templates are indeed from users, admins, etc, en I just wanted to check for error before displaying.
The way I use now works pretty good, so i'll stick to it. |
Topic: Smarty template syntax check |
RGordijn
Replies: 4
Views: 9597
|
Forum: General Posted: Mon Jan 21, 2008 1:38 pm Subject: Smarty template syntax check |
Thats a good point u got there celeb, I builded allready into my app.
And I found a way to cover my problem:
First I fecth all the 3 templates with fetch(), When smarty is fetching()-ing and 1 o ... |
Topic: Smarty template syntax check |
RGordijn
Replies: 4
Views: 9597
|
Forum: General Posted: Mon Jan 21, 2008 8:34 am Subject: Smarty template syntax check |
Hi,
I modified the Smartye.class.php a bit:
function trigger_error($error_msg, $error_type = E_USER_WARNING)
{
//trigger_error("Smarty error: $error_msg ... |
|