Z
Z
zzmaster2020-05-26 20:14:10
DLE
zzmaster, 2020-05-26 20:14:10

How to set {macro} in DLE in a custom module and then use it?

here in some .tpl I want to use the module like this

{include file="/engine/modules/lafafa.php"}

/engine/modules/lafafa.php

$tpl->load_template('modules/lafafa.tpl');
$tpl->set( "{url}", 'http://ya.ru' );
$tpl->set( "{text}", 'yaya' );
$tpl->compile('content');

template/xxx/modules/lafafa.tpl is almost beautiful but doesn't work. is it possible in dle?
<a href="{url}">{text}</a>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question