Akenefick
3 years agoGenius
Distinguish Between Stage and Production With FreeMarker
Is there a way to distinguish between Stage and Production using FreeMarker?
Thanks
This should do it!
${config.getString("phase", "prod")}
If, for some reason, that doesn't work for you, I also found another option in a post from PerBonomi ( Too many tabs? Can't tell Prod and Stage apart anymore? ) :
<#if current_url?contains("<insert stage-unique url section, e.g. community-stage.site.com>") == true>
Cheers!