0

I make a call like: $this->element('stories') in order to display the contents of this element named "stories" in multiple pages. When I use the html helper inside the element, I get the following error: Missing Helper Error: htmlHelper could not be found.

Note: I am using CakePHP 2.4

Thanks

2
  • Are you sure you enabled Htmlhelper in all your controllers? Also: HtmlHelper with capital 'H' Commented Oct 14, 2013 at 19:35
  • Yeah, mind your casing - as with almost everything related to programming and operating systems (even if you are coming from Windows^^). Commented Oct 14, 2013 at 21:22

1 Answer 1

1

You can use the html helper like..

<?php 
   // not echo $html->link('text', 'url'); 
   // not echo $this->html->link('text', 'url'); 
   echo $this->Html->link('text', 'url'); 
?>

Please check your code. Please have a look on the documentation.

Sign up to request clarification or add additional context in comments.

1 Comment

also, don't forget the echo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.