xref: /webtrees/resources/views/tree-page-block.phtml (revision ac71572d8462e396ed5a307f05b29381e49f9e6e)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\TreePageBlock;
6use Fisharebest\Webtrees\Module\ModuleBlockInterface;
7use Fisharebest\Webtrees\Tree;
8
9/**
10 * @var ModuleBlockInterface $block
11 * @var int                  $block_id
12 * @var Tree                 $tree
13 */
14
15?>
16
17<?php if ($block->loadAjax()) : ?>
18    <div class="wt-ajax-load" data-wt-ajax-url="<?= e(route(TreePageBlock::class, ['tree' => $tree->name(), 'block_id' => $block_id])) ?>"></div>
19<?php else : ?>
20    <?= $block->getBlock($tree, $block_id, ModuleBlockInterface::CONTEXT_TREE_PAGE) ?>
21<?php endif ?>
22