Hello,
I have a page TippToppMatchesPage with
static $has_many = array(
'Matches'=>'TippToppMatch',
);
Each TippToppMatch (DataObject) has
static $has_many = array(
'Tipps' => 'TippToppTipp'
);
TippToppTipp is also a DataObject
On TippToppMatchPage I want to show a list of all matches and the "tipp" (german for guessing/betting on a result) of the current user. Therefore, in the template I'd like to do something like this:
<% control Matches %>
<tr class="match">
<td class="matchDate">$Date</td>
<td class="tipp">Top.$TippOfCurrentUserForm($ID)</td>
<% end_control %>
Unfortunately, this is not allowed since "you (...) cannot past a variable into a variable"
I have found several posts where others had a similar problem, but there never was a solution other than "you have to find a way around it".
Which way to proceed?
TippToppTipp and TippToppMatch are DataObjects, the only Controller available is TippToppMatchesPage but I don't see how TippToppMatchesPage should be able to "see" which TippForm I want to show without using a parameter.
Any suggestion, tutorial or hint?
Thanks in advance,
Christian