Show bootstrap modal on render another template

I wrote bootstrap modal and I put it in separate template. Open it base on click on button I can, but now I try to show it when another template is rendered. It is simple message after user log in. Thanks for any help.