How to create your own helpers

How to create your own helpers 1.1

No permission to download
Another great tutorial, thanks!

"echo" in the $helperCallbacks array is just the name of your particular custom helper, right? One thing you might want to mention - it seems this name cannot contain a capital letter. I nearly went crazy trying to figure out why my custom helper didn't work, and that was it - I had named it after the method which did its calculation, which contained a capital letter in camel case.

Should a custom helper always return a string?

I coulda sworn this thread was locked earlier :S (sorry for the report)

Anyway.... @Fuhrmann could the tutorial point out that helper names must be in lower case? I spent hours yesterday cussing you whilst trying to get "myHelper" to work until I went back to the drawing board and then realised they must have to be all lower case. :)

Is anyone able to go more in depth on this now that callbacks would appear to be a better alternative?
How would you achieve the example in the op, but with a callback?


PLEASE update to say that the name has to be lowercase. I, too, spent far too long trying to figure out what I did wrong... I spent over twice the amount of time trying to debug this than I spent actually creating the helper. Please add something in the tutorial about lowercase. It's essential.
 
Back
Top Bottom