Ghufron Asadly. Diberdayakan oleh Blogger.

HTML link,image, button edit,add,delete Cakephp

Selasa, 03 Februari 2015

HTML image
echo $this->Html->image('DebugKit.icon.png');
HTML Link image
echo $this->Html->image("recipes/6.jpg", array(
    "alt" => "Brownies",
    'url' => array('controller' => 'recipes', 'action' => 'view', 6)
));
outputnya
<a href="/recipes/view/6">
    <img src="/img/recipes/6.jpg" alt="Brownies" />
</a>
HTML link
echo $this->Html->link(
    'Delete',
    array('controller' => 'recipes', 'action' => 'delete', 6),
    array('confirm' => 'Are you sure you wish to delete this recipe?'),
);
HTML Link target blank
echo $this->Html->link(
    'Enter',
    '/pages/home',
    array('class' => 'button', 'target' => '_blank')
);
<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $event['Event']['id']), array('class' => 'btn btn-danger btn-xs', 'escape' => false), __('Are you sure you want to delete # %s?', $event['Event']['id'])); ?>



Tidak ada komentar:

Posting Komentar

 

Most Reading