$this->set('title', 'Title Name'); not working in CakePHP 3.x

后端 未结 6 1123
温柔的废话
温柔的废话 2021-01-11 19:42

Basically in default.ctp I have this for my title:


  <?= $this->fetch(\'title\') ?>

And inside of the

6条回答
  •  萌比男神i
    2021-01-11 19:46

    If you want stick to your code, after setting "title" variable just simply write this:

        
        assign('title', $title); ?>
        fetch('title') ?>
    

提交回复
热议问题