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

Oleksandr
Oleksandr

Hello. Is it possible to use custom page variable in Configuration section? When I do this:

url = "/blog"
layout = "default"
custom_var = "value"
==
{{ custom_var }}

my custom_var is deleting when edit page from admin panel. I need to use this variable in my layout like this {{ this.page.custom_var }}.

Last updated

Sam
Sam

Why don't you define your custom_var in the PHP Code section of your layout file, and then just call the variable on the page?

Oleksandr
Oleksandr

I need some different unique value on different page to know in layout, what page is loaded. So I've decided to use {{ this.page.baseFileName }}

1-3 of 3

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