how to call internal html from cakephp?

How to call CSS class on a CakePHP Html->link?

  • I am a complete noob to programming and CakePHP all together, so please be patient. How am I supposed to call the CSS on this Html->link: <?php echo $this->Html->link(__('Blogs', true), array('controller' => 'posts', 'action' => 'index') ); ?> Please help.

  • Answer:

    Not sure what you mean by "call the css", I think you want to add a class to this link? IF that's the case you can just add another array as an argument and it will turn key =? value into HTML attributes. EG: echo $this->Html->link(__('Blogs', true), array('controller' => 'posts', 'action' => 'index'), array('class' => 'my-class')); This is all explained in the http://book.cakephp.org/view/1442/link.

Newbie Coder at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.