【发布时间】:2015-06-24 13:32:33
【问题描述】:
我想在我的索引中添加字形而不是文本,添加、编辑视图。
这在 index.ctp 中有效
<?= $this->Html->link(__('<i class="glyphicon glyphicon-pencil"></i>'), ['action' => 'edit', $user->user_id], array('escape' => false)) ?>
但是,当我为删除操作执行此操作时,它会向我显示字形图标,但不会给我“您确定要删除用户吗?”没有了
<?= $this->Form->postLink(__('<i class="glyphicon glyphicon-minus"></i>'), ['action' => 'delete', $user->user_id], array('escape' => false), ['confirm' => __('Are you sure you want to delete {0}?', $user->username)]) ?>
在 view.ctp 中,它破坏了后面的代码,因此后面的内容不会显示出来。 (在这个例子中,是 glyphicon-pencil 之后的内容。glyphicon-pencil 本身也没有显示出来。
<?= $this->Html->link(__('<i class="glyphicon glyphicon-pencil'), ['action' => 'edit', $user->user_id], ['escape' => false]) ?>
【问题讨论】:
标签: php twitter-bootstrap cakephp cakephp-3.0 glyphicons