Hello,
I would like to create a plugin that replace a line in a template with my line of code.
How can i do it?
Hello,
I would like to create a plugin that replace a line in a template with my line of code.
How can i do it?
Hi,
what do you want to achieve with it? Probably there is another, better solution, without editing templates.
So.. For example, how can I put something before the forum list?
Thanks
Hi,
you can use an Template-Listener:
templateListener.xml:
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/templateListener.xsd">
<import>
<templatelistener name="example">
<environment>user</environment>
<templatename>boardList</templatename>
<eventname>userNotice</eventname>
<templatecode><![CDATA[{include application='wbb' file='__example'}]]></templatecode>
</templatelistener>
</import>
</data>
Alles anzeigen
And a template __example.tpl with your code.
In your package.xml you should add the templates and the template-listener (like: <instruction type="templateListener">templateListener.xml</instruction>.
Thank you so much! =)
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!