middlemanmiddleman-4

How do I determine the current layout in Middleman 4?


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+?


Solution

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