0

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 patientInfoTemplatewith 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?

1 Answer 1

1

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)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.