G
G
game8022017-02-16 17:11:54
CMS
game802, 2017-02-16 17:11:54

How to display a tag in a template?

Good afternoon dear experts. Faced the following problem in DLE:
I wrote a plugin for the admin panel + for displaying information in a template. But here I ran into a problem with displaying tags {news-title}or {news-image}.
In modules/popular-news.php I have lines where the string is passed

$tpl->load_template('popular-news.tpl');
$tpl->set( '{news-title}', $news_title );
$tpl->set( '{news-link}', $news_link );
$tpl->set( '{news-comments}', $news_comments );
$tpl->set( '{news-images}', $news_images );
$tpl->set( '{news-read}', $news_read );

$tpl->compile('popular-news');
$tpl->clear();

How to display these tags in popular-news.tpl? There is no information about this on the Internet at all ...
Maybe something else needs to be registered somewhere? I've already rummaged through everything, but I can't draw a conclusion ... I would be glad for any help and any tip on this issue, thanks!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
game802, 2017-02-22
@game802

My recommendation:
Do not bother with this matter and output everything via echo.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question