How do I create an external link using cakephp?

Asked

Viewed 301 times

0

A link of the type below serves to link to a page(view) of our own system:

<?php echo $this->Html->link('Listar todas as tarefas', array('action'=>'index')); ?>

And if I want to link to youtube for example or another site?

1 answer

1


Just replace the array of the second parameter by the desired URL. Thus:

echo $this->Html->link('YouTube', 'http://www.youtube.com');
  • I had done it and it didn’t work.

  • I was doing something wrong. Now it was. Thanks.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.