This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jared.meyering
jared.meyering

Looking to have some conditional markup in my twig templates that display certain portions depending on the app environment. Is there a built in way to grab the CMS_ENV value within a template? or is that not possible at this time?

gtf21
gtf21

I would also really like to know how to do this. Just having {{ App::environment() }} doesn't seem to do anything.

alxy
alxy

Checkout this one: https://octobercms.com/docs/cms/markup#default-variables

Maybe this.enviroment is what you are looking for.

Last updated

jared.meyering
jared.meyering

This is implemented with {{ this.environment }} http://octobercms.com/docs/cms/markup

gtf21
gtf21

Thanks guys.

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.