S
S
Sergey2017-10-13 22:18:42
CodeIgniter
Sergey, 2017-10-13 22:18:42

How to load one view in all controller methods?

Good time.
There is one big view. Parameters are merged into it, substituted and displayed. Everything is very simple. But in the controller there are many methods for different paths and they all load the same view. Is there a way to not duplicate in every method? Those. after the controller received data from the model, the view was loaded automatically.
$this->load->view('myview', $mydata);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-10-13
@Prow1er

Use one controller method to validate and substitute parameters in the view.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question