Share » Forums » Developer » Help needed: passing URL parameters...

Help needed: passing URL parameters as function arguments

Help needed: passing URL parameters as function arguments

Friday 10 June 2005 2:38:44 am - 2 replies

Author Message

Massimiliano Bariola

Friday 10 June 2005 5:13:06 am

Seems like I figured it out.
Parameters from URL are passed to the view php file in the $Params array.

the view file passes them to the relevant template via $tpl->setVariable.

the template, in turn passes them to the php class and method through the parameters of the fetch function.

Now it "works". maybe there is a more straightforward approach which I didn't notice?

TIA

Massimiliano Bariola

Friday 10 June 2005 5:58:57 am

... then I rewrote my code with my newfound knowledge, only to discover it won't work!

<headbanging />

I discovered it's some kind of capitalization issue. parameter names in a fetch are sensitive to their first letter's case. but not to the case of other letters.

e.g. CurrencySymbol != currencySymbol
but
currencySymbol == cUrrENCYSymbol == cURRENCYSYMBOL.

I have been browsing the documentation but didn't find anything mentioning it (except for case-sensitiveness of $variables).

the code line in the template:

{def $rates=fetch( 'eurofxref', 'fxref' , hash(cURRENCYSYMBOL, $currSymbol))}

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu