en html,
<a href="some_url"> Contact Seller </a>En Cakephp,
<?php echo $this->Html->link('Contact Seller', array('controller'=>'pages', 'action'=>'contactseller', 'full_base'=>true)); ?>Pero tengo problemas para convertir el siguiente html a Cakephp:
<a href="some_url" onClick="return popup(this, 'popup_name')">my popup</a>El siguiente es un método javascript emergente:
function popup(mylink, windowname) { if (! window.focus) return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, windowname, 'width=400,height=200,scrollbars=yes'); return false; }¿Cómo convierto el html a Cakephp?
<a href="some_url" onClick="return popup(this, 'popup_name')">my popup</a>Gracias por adelantado. :)
<a href="some_url" onClick="return popup(this, 'popup_name')">my popup</a>convertiría a esto en CakePHP:
$this->Html->link('my popup', 'some_url', ['onclick' => 'return popup(this, "popup_name")']);FYI, puede poner cualquier atributo en el tercer argumento del método link(). La documentación sobre la creación de enlaces es bastante extensa y ofrece ejemplos.