Welcome Guest, Not a member yet? Register   Sign In
How can i load a library file in a helper file?
#5

[eluser]dcunited08[/eluser]
[quote author="MMacdonald" date="1226085009"]What are you trying to achieve here? Helpers are meant to be small, procedural functions for carrying out simple tasks.

The syntax below works, but I'm not convinced that calling libraries within helpers is "good practice". I'd be interested to know other peoples' opinions.[/quote]

I would tend to agree with you and almost put that in my earlier response. It is possible to do it that way but I would not make a habit of it. My question would be why are you using a helper and not a library for this? That being said, I have done it once when I could not see another, easier option. My function loaded all the views in a particular folder.


Messages In This Thread
How can i load a library file in a helper file? - by El Forum - 11-07-2008, 06:48 AM
How can i load a library file in a helper file? - by El Forum - 11-07-2008, 06:57 AM
How can i load a library file in a helper file? - by El Forum - 11-07-2008, 06:59 AM
How can i load a library file in a helper file? - by El Forum - 11-07-2008, 07:10 AM
How can i load a library file in a helper file? - by El Forum - 11-07-2008, 07:19 AM
How can i load a library file in a helper file? - by El Forum - 11-07-2008, 07:19 AM
How can i load a library file in a helper file? - by El Forum - 11-07-2008, 07:38 AM
How can i load a library file in a helper file? - by El Forum - 11-07-2008, 07:54 AM
How can i load a library file in a helper file? - by El Forum - 11-07-2008, 08:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB