the template system does not intentionally allow the following: Assignment to variables Function call arguments Advanced logic This decision was made to prevent you from adding business logic in templates. From my experience with PHP or ASP-like languages, mixing logic with presentation can be a maintenance nightmare.