foreach templating functionality, text binding