Layouts methods
Layouts methods are registered with the layoutsMethods
extension.
Default layouts methods
For a full list of default layouts methods, please check out the Reference.
Be aware that you cannot override these default layouts methods with any custom layouts method.
Getting started
You can extend the set of defined layouts methods in a plugin file.
This example shows the basic architecture of a layouts method. You define the method name with the key for the layoutsMethods
extension array. $this
in the callback function refers to the $layouts
object.
Working with method arguments
In some cases it might be helpful to be able to pass arguments to the method:
You can define arguments for a method like this:
And then use it like this: