21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1218 Views |
-
Passing parameters into template.ss

3 July 2010 at 7:33pm Last edited: 7 July 2010 8:09pm
Is it possible to write into .ss file $Price_Product($ProductID)?
I've syntax error.
I create a workaround with a function that don't want parameters:
function Price_Product_2() {
$prod=DataObject::get_by_id('Product', $this->Product()->ID);
return $prod->PriceProduct;
}Thank you
-
Re: Passing parameters into template.ss

9 July 2010 at 3:00am
I don't think that is possible. I figured out some ways to do it before, but the implementation was weird - you couldn't pass in more than one argument or an argument with spaces. I was able to find work-around in my controller for what I was doing.
-
Re: Passing parameters into template.ss

9 July 2010 at 3:20am
You can pass an argument into a $FunctionCall as long as it is hardcoded, e.g. $FunctionCall(5) but not using a $iVariable that has the value 5. Something about only having one pass of the template...
| 1218 Views | ||
|
Page:
1
|
Go to Top |


