Welcome Guest, Not a member yet? Register   Sign In
Best practise advice needed - where to put small PHP widgets within the app?
#3

[eluser]jedd[/eluser]
[quote author="Peter Lachky" date="1262508344"]
My question is: Where do I put these widgets? Those are rather small pieces of code and I would like to keep them in separate files. However, these can not be views as some of them need to access the database. What is the best practise to achieve something like this?
[/quote]

View partials can still be given data from the database, so this means that these widgets (or view partials) can still be views (ie. reside under the views directory somewhere).

Have a read of these two threads - they might provide a bit more insight into the general pattern.

[url="http://ellislab.com/forums/viewthread/109698/"]http://ellislab.com/forums/viewthread/109698/[/url]
[url="http://ellislab.com/forums/viewthread/110969/"]http://ellislab.com/forums/viewthread/110969/[/url]


Messages In This Thread
Best practise advice needed - where to put small PHP widgets within the app? - by El Forum - 01-03-2010, 03:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB