Forum Discussion

Akenefick's avatar
Akenefick
Genius
3 years ago

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!