Anyone ?
On 19/02/2021 01.01, Damien Regad wrote:
Greetings,
I need to use the current template in a plugin's script.js, but AFAIK
this information is not readily available.
My first idea was to use DOKU_TPL and extract the template name from the
path, e.g.
let template = DOKU_TPL.replace(/[\\/]$/, "").split(/[\\/]/).pop();
Then I wondered if it would not be better to export that from
$conf['template'] into JSINFO instead, as documented here
https://www.dokuwiki.org/devel:javascript#jsinfo
Thoughts / advice on the better approach would be appreciated.
Cheers
Damien