Skip to content

Commit bf80c7e

Browse files
committed
Remove examples of using deprecated features.
Refs cakephp/cakephp#6296
1 parent fd9ae64 commit bf80c7e

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

en/views.rst

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -354,27 +354,15 @@ JavaScript and CSS files from views.
354354

355355
The ``content`` block contains the contents of the rendered view.
356356

357-
``$title_for_layout`` contains the page title. This variable is generated automatically,
358-
but you can override it by setting it in your controller/view.
357+
``$title_for_layout`` contains the page title. This variable is generated
358+
automatically, but you can override it by setting it in your controller/view as
359+
you would any other view variable.
359360

360361
.. note::
361362

362363
The ``$title_for_layout`` is deprecated as of 2.5, use ``$this->fetch('title')``
363364
in your layout and ``$this->assign('title', 'page title')`` instead.
364365

365-
Setting the title for the layout is easiest to do in the
366-
controller, setting the ``$title_for_layout`` variable::
367-
368-
class UsersController extends AppController {
369-
public function view_active() {
370-
$this->set('title_for_layout', 'View Active Users');
371-
}
372-
}
373-
374-
You can also set the title_for_layout variable from inside the view file::
375-
376-
$this->set('title_for_layout', $titleContent);
377-
378366
You can create as many layouts as you wish: just place them in the
379367
``app/View/Layouts`` directory, and switch between them inside of your
380368
controller actions using the controller or view's

0 commit comments

Comments
 (0)