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

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

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


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

And inside of the

6条回答
  •  甜味超标
    2021-01-11 19:51

    I have done this, this way in default.ctp

    
    
    
        <?php echo $cakeDescription ?>: <?php echo $title_for_layout; ?>
    
    

    In my view file, I have done this.

    assign('title', 'Your Title');?>
    

提交回复
热议问题