O
O
Oversec2017-05-13 14:45:38
PHP
Oversec, 2017-05-13 14:45:38

How to pass parameters to .tpl dle files?

This question is not about the CMS itself, but more about php. I would like to pass parameters (news id, etc.) to a file with a template, since the site uses cms dle, I would like to do this with pure php, maybe someone has already faced such a task?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Tutubalin, 2017-05-15
@Oversec

In the file /engine/modules/show.full.php
before

$tpl2 = new dle_template();
$tpl2->dir = TEMPLATE_DIR;
$tpl2->load_template( 'relatednews.tpl' );

insert then in the fullstory.tpl template use the {news_ids} tag

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question