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
Related Q & A:
- How to call a popup from a link inside another popup?Best solution by stackoverflow.com
- How to call a function with parameter in a bash script?Best solution by tldp.org
- How to call .aspx page from a web web service(service.svc?Best solution by Stack Overflow
- How to create a CakePHP search form?Best solution by Stack Overflow
- How to call delegate methods from other class in Swift?Best solution by stackoverflow.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.