Reputation: 2767
Im not sure if i got the nomenclature right in the title of my question, Im new to play. Basically I wanted to break my html template by calling 2 sub-templates ( passing to them as argument an sub-object from the main template).
So my main template would be
@* patientInfoFrame Template File *@
@(alarm: Alarm)
@import helper._
@* Caller part *@
@calleInfoTemplate(@alarm.callee)
@* Patient part *@
@patientInfoTemplate(@alarm.patient)
where I receive an Alarm object as variable and would build part of the page by calling a second template calleInfoTemplate
with a sub-object from the Alarm object and then a third template patientInfoTemplate
with another sub-object.
If I try to compile that it fails saying that @alarm.callee
is an illegal start of simple expression.
How can I pass those sub-objects as input to the other templates?
Upvotes: 0
Views: 248
Reputation: 3449
You don't need the @
escape character on your variables in this case because you are already inside a dynamic statement (the template call).
@* Caller part *@
@calleInfoTemplate(alarm.callee)
@* Patient part *@
@patientInfoTemplate(alarm.patient)
Upvotes: 1