Answer the question
In order to leave comments, you need to log in
How can I make a popup on any url in yii2?
Hi all! Tell me how you can make a pop-up modal window on any url if the user logs in for the first time, so that he selects the settings, and this happened on any Url?
Registering a check for each action is not an option ...
Answer the question
In order to leave comments, you need to log in
Put in layout.
<?
if (Yii::$app->user->isGuest) {
$js = <<<JS
$('body').on('click','a',function(e){
e.preventDefault();
//стартуете модальное окно
});
JS;
$this->registerJs($js);
}
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question