How do I determine the current layout in Middleman 4?

106 Views Asked by At

Up through Middleman 3 I could determine the layout of the current page like this.

current_page.data.layout

As of Middleman 4 this no longer works. How can I determine what the current layout is in 4+?

1

There are 1 best solutions below

0
On BEST ANSWER

In Middleman 4, you can access the layout of a resource with resource.options[:layout].