xref: /webtrees/resources/views/tree-page-block.phtml (revision 4a9a60957058ca2a34e30a0d6f783e1540606590)
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