You will need to add the current page object to the timber context using timber_context
filter.
Something like this
add_filter('timber_context', 'bt_timber_add_to_context');
function bt_timber_add_to_context ($context) {
// add current page content
$context['page'] = Timber::get_post();
return $context;
}
That’s how I added it in my custom timber theme.
Now when you want to get the page content you can do this
{{ page.content }}
This is availalbe only if you use Timber::context()
in your render
/compile
methods.
Basically if you use Timber::context()
, one of the object properties will be page