tags:

views:

41

answers:

1

Is it possible to get the current page's URL in FTL?

+2  A: 

As far as I can tell, freemarker is strictly a templating engine -- it simply produces text, and has no way of knowing where that text will appear. If you want to include the "current page's URL", you'll either have to pass that data into the template from the host Java code (recommended) or you'll have to detect it client-side using javascript.

Faisal