Append content before body closing #34880
-
I am inside a module template (/templates/mytemplate/html/mod_login/modal.php) and I want to split the module in 2 parts: one that is output directly (and appears in its module position as defined by the template) and one that is written at the end of body (or at the beginning, doesn't matter, it just matters to be outside any html element because I have issues with the bootstrap modal z-index). <button type="button" class="btn" data-bs-toggle="modal"
Some content
</button>
<?php
$app->appendBody(
<<<HTML
<div id="login-form-<?php echo $module->id; ?>-wrapper"
class="modal fade" tabindex="-1">
Some content
</div>
HTML
); This doesn't work, I think body is reset somewhere else. What is the correct way to achieve this? Without using JS to move the element client side. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The code already exists: #32062 Would be helpful for all the modals or other non-essential HTML to be thrown at the bottom... |
Beta Was this translation helpful? Give feedback.
The code already exists: #32062
Would be helpful for all the modals or other non-essential HTML to be thrown at the bottom...