Skip to content

Commit

Permalink
feat: support $this for template in RockPageBuilder blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jan 10, 2023
1 parent addccf5 commit 6856bb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RockMigrations.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function getModuleInfo()
{
return [
'title' => 'RockMigrations',
'version' => '2.9.2',
'version' => '2.10.0',
'summary' => 'The Ultimate Automation and Deployment-Tool for ProcessWire',
'autoload' => 2,
'singular' => true,
Expand Down Expand Up @@ -1810,6 +1810,7 @@ public function getUser($name, $quiet = false)
*/
public function getTemplate($name, $quiet = false)
{
if ($name instanceof RockPageBuilderBlock) return $name->getTpl();
if ($name instanceof Page) $name = $name->template;
$template = $this->templates->get((string)$name);
if ($template and $template->id) return $template;
Expand Down

0 comments on commit 6856bb9

Please sign in to comment.