Hi,
#This e-mail is a reply to the message of Damien Regad
<dregad@xxxxxxxxxxxx>, sent on Sat, 27 Feb 2021 00:13:15 +0100:
#"
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#end of previous message"
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