I
I
issssrt2014-04-29 20:38:35
MODX
issssrt, 2014-04-29 20:38:35

Modx Revo: changing template with a plugin?

Rewriting plugin from evo to revo. The essence such that in evo it was possible to change a template so
global $content;
$content['template'] = 7;
It does not roll in the revo. Can you tell me how to do this in the plugin?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alvisX, 2014-05-02
@alvisX

To change the template of the current document, I saw the following code through the controller:

$modx->controller->setProperty('template', $template);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question