CakePHP View謫堺ス Html繝倥Ν繝代シ

繝ェ繝ウ繧ッ

<?= $this->Html->link( 'Models.methodNm', ['action' => '繝。繧ス繝繝牙錐' ] ) ?>

逕サ蜒

<?= $this->Html->image('ス/ス.png',
縲縲[
縲縲縲縲'width' => '100px',
縲縲]
); ?>

CSS繝輔ぃ繧、繝ォ隱ュ縺ソ霎シ縺ソ

<?= $this->Html->css('ス.css') ?>
隱ュ霎シ險ュ螳

<?= $this->fetch('css') ?>
隱ュ霎シ螳溯。(html繧ソ繧ー繧貞コ蜉)

JS繝輔ぃ繧、繝ォ隱ュ縺ソ霎シ縺ソ

<?= $this->Html->script('ス.js') ?>
隱ュ霎シ險ュ螳

<?= $this->fetch('script') ?>
隱ュ霎シ螳溯。(html繧ソ繧ー繧貞コ蜉)

謖螳壹ち繧ー逕滓

$this->Html->tag('(繧ソ繧ー蜷)', '(譁蟄怜)');

div繧ソ繧ー逕滓

$this->Html->div('(繧ッ繝ゥ繧ケ蜷)', '(譁蟄怜)');

p繧ソ繧ー逕滓

$this->Html->para('(繧ッ繝ゥ繧ケ蜷)', '(譁蟄怜)');

charset謖螳

$this->Html->charset('utf-8');

繝繝シ繝悶Ν繧ソ繧ー逕滓

繝倥ャ繝繝シ
$headers = $this->Html->tableHeaders(['險隱', '繝輔Ξ繝シ繝繝ッ繝シ繧ッ']);

繧サ繝ォ
$cells = $this->Html->tableCellss(
縲縲['Java', 'Spring'],
縲縲['PHP', 'CakePHP3'],
縲);

$this->Html->tag('table', $headers . $cells);

竊堤オ先棡
<table>
縲<tr><th>險隱</th><th>繝輔Ξ繝シ繝繝ッ繝シ繧ッ</th></tr>
縲<tr><td>Java</td><td>Spring</td></tr>
縲<tr><td>PHP</td><td>CakePHP3</td></tr>
</table>

繝ェ繧ケ繝医ち繧ー逕滓

$this->Html->nestedList(
縲[
縲縲'險隱' => ['Java', 'PHP'],
縲縲'繝輔Ξ繝シ繝繝ッ繝シ繧ッ' => ['Spring', 'CakePHP3']
縲]);

竊堤オ先棡
繝サ險隱
縲繝サJava
縲繝サPHP
繝サ繝輔Ξ繝シ繝繝ッ繝シ繧ッ
縲繝サSpring
縲繝サCakePHP3

繝代Φ縺上★繝ェ繧ケ繝育函謌

繝。繝九Η繝シ鬆逶ョ
$this->Html->addCrumb(繝。繝九Η繝シ鬆逶ョ, 繝ェ繝ウ繧ッ蜈, 螻樊ァ);

繝。繝九Η繝シ險ュ螳
$this->Html->addCrumbs(蛹コ蛻繧頑枚蟄, TOP繝。繝九Η繝シ鬆逶ョ);

<?php
縲$this->Html->addCrumb('繝壹シ繧ク2', ['controller' => 'ス', 'action' => 'ス']);
縲$this->Html->addCrumb('繝壹シ繧ク3', '');
縲$this->Html->addCrumbs(' > ', [
縲縲縲'text' => '繝壹シ繧ク1',
縲縲縲'url' => '/',
縲縲縲'escape' => false,
縲縲]);
?>

竊堤オ先棡
繝壹シ繧ク1 > 繝壹シ繧ク2 > 繝壹シ繧ク3

繧ォ繝繧エ繝ェ繝シCakePHP