You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We provide several other ways of using custom templates, most obviously the block template system, but a theme using a page template might want to render some blocks with a changed template in the context of that page
That's currently not particularly simple for a theme writer to do: it involves either duplicating the render code of the block or getting the actual block layout object to call its render (which does let you pass a template).
render() in the helper is already handling templates for the block template feature and so has the basic structure already of passing a template to the block layout's render() when necessary. This could be as simple as removing the explicit initialization to null here https://github.com/omeka/omeka-s/blob/develop/application/src/View/Helper/BlockLayout.php#L140 and instead introducing a null-default argument to the method.
The text was updated successfully, but these errors were encountered:
We provide several other ways of using custom templates, most obviously the block template system, but a theme using a page template might want to render some blocks with a changed template in the context of that page
That's currently not particularly simple for a theme writer to do: it involves either duplicating the render code of the block or getting the actual block layout object to call its render (which does let you pass a template).
render() in the helper is already handling templates for the block template feature and so has the basic structure already of passing a template to the block layout's render() when necessary. This could be as simple as removing the explicit initialization to null here https://github.com/omeka/omeka-s/blob/develop/application/src/View/Helper/BlockLayout.php#L140 and instead introducing a null-default argument to the method.
The text was updated successfully, but these errors were encountered: