Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fix for snippets rendered via Multiplier (unnecessary since 2.0.1 I guess)
<?php
// Nette/Latte/Macros/UIMacros - after line 507
$httpParams = $control->getPresenter()->getContext()->httpRequest->getQuery();
foreach ($control->getComponents(FALSE, 'Nette\Application\UI\Multiplier') as $multiplier) {
foreach ($httpParams as $param => $signal) {
if ($param == 'do' && Strings::startsWith($signal, $multiplier->getName()) && ($pos = strrpos($signal, '-')) !== FALSE) {
$child = $control->getComponent(substr($signal, 0, $pos));
$child->snippetMode = TRUE;
$child->render();
$child->snippetMode = FALSE;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment