3212 Posts in 847 Topics by 809 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 509 Views |
-
very simple question about control

7 September 2010 at 9:21pm
Hi , there is something I can not understand at all... and it's very simple.
I have a
NewsHolder extends Page
and
NewItem extends Page
then in
NewItem_Controller extends Page_Controller
...
function my_NewItem_function ()
{
return "this is a test";
}so in NewsHolder.ss
<% control AllChildren %>
<h1> $title </h1>
<p> $my_NewItem_function </p>
<% end_control %>Very simple, right?
It just doesnt work. Inside the control it just doesnt recognize the method of NewItem. I dont understand it.
If , in the control, i use something like $Top.my_NewsHolder_function --> It works !I looked for a threath that talks about it but i didnt find it... i thanks any help...
-
Re: very simple question about control

7 September 2010 at 11:58pm
I got it...
the function
function my_NewItem_function ()
{
return "this is a test";
}should be defined in the model ,, not in the Controller...
cheers
| 509 Views | ||
|
Page:
1
|
Go to Top |

