Depending on your use case, you can also use the data that is already present on your page and feed that in to the template engine. Allowing you to provide a richer experience for those who have JavaScript enable for example ;)