Content Include Hook
Starting from Plesk 12, in addition to the ability to include
The login page in Plesk does not include additional scripts that are used on other Plesk pages. To form additional content on the login page, you need to use the class pm_Hook_LoginContentInclude.
The method must return an array which will be converted to JSON and embedded into a resulting HTML page, inside the HEAD tag.
For access to the data formed on the server side, an extension called
embed-js can use an object
PleskExt.EmbedJs.Config. In addition to that, the namespace
PleskExt.EmbedJs will be created.
There are also methods
It is also possible to embed additional HTML content at the end of the HEAD and BODY tags. To do this, the methods
getBodyContent can be used. The following is an example of how to use these methods:
You can find the sample code in our repository here.