Redoing the site of the template. There is an "Add" button on the page. If the user is already authorized, the necessary page opens, otherwise the authorization window pops up. Here is the button code:
[[!+modx.user.id:gt=`0`:then= `<a href="[[~35]]?cat=18" class="btn" id="add">Добавить</a>` :else= `<a><button class="btn" id="add" data-toggle="modal" data-target="#logIn">Добавить</button> </a>`]] In one place of the site there is a group of buttons with links to pages that are defined as resources in the modex manager. Like this:
<div class="col-md-10 col-xs-12 col-md-offset-1 menu"> [[pdoMenu? &parents=`0` &level=`1` ]] </div> You need to add this button to them.
I created the resource, how to redirect the user to authorization from there, if he has not yet passed it and open the necessary page, if he has passed?