$hjs is valid for any plugin call on a page; it's only a problem if the plugin call is made from the template's body.
Ah. Then you need to return:
Code: Select all
<?php
function myJs() {
return '<link href="/1632923145_813/core/framework/libs/pj/css/pj.bootstrap.min.css" type="text/css" rel="stylesheet" />'
. '<link href="/1632923145_813/index.php?controller=pjFront&action=pjActionLoadCss&id=10" type="text/css" rel="stylesheet" />'
. '<script type="text/javascript" src="/1632923145_813/index.php?controller=pjFront&action=pjActionLoadJS"></script>'
. '<script type="text/javascript" src="/1632923145_813/index.php?controller=pjFront&action=pjActionLoad&id=10"></script>';
}
Code: Select all
<?php
function myJs() {
global $hjs;
$hjs .= '<link href="/1632923145_813/core/framework/libs/pj/css/pj.bootstrap.min.css" type="text/css" rel="stylesheet" />'
. '<link href="/1632923145_813/index.php?controller=pjFront&action=pjActionLoadCss&id=10" type="text/css" rel="stylesheet" />';
return '<script type="text/javascript" src="/1632923145_813/index.php?controller=pjFront&action=pjActionLoadJS"></script>'
. '<script type="text/javascript" src="/1632923145_813/index.php?controller=pjFront&action=pjActionLoad&id=10"></script>';
}
I mean that they might say that you can insert a HTML element with a certain ID (or something like that) somewhere on the page, for instance:
Code: Select all
<div id="poll_container"></div>