A
A
AlexSer2018-04-14 09:56:40
Yii
AlexSer, 2018-04-14 09:56:40

How to pass data to main.php(frontend/views/layouts) page?

Hello, tell me how to pass data to the menu header of the main.php page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2018-04-14
@slo_nik

Good morning.
In the controller

public $main_layout;

public actionIndex()
{
   $this->main_layout = 'TESTING';
}

In main.php
echo $this->context->main_layout;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question