Welcome Guest, Not a member yet? Register   Sign In
Database Powered Template Parser Variable Pairs?
#2

[eluser]pickupman[/eluser]
I may be reading your question wrong, but I think you may have confused yourself. The parser class is for not inputting information into a database. It's a simple templating system like smarty. Rather than echo php variables you use the pseudo curly braces in your view.

As far as wanting to more complicated scripts in your model rather than controller, is perhaps a little off. Your model should be for CRUD only. There really shouldn't be anything more than that. Creating your own library/helper would be serve repetitive coding.

Based on what I think you are trying to accomplish should be like:
1.) Retrieve news articles from DB in your model
2.) Iterate result object adding articles to an array in controller
3.) Create a view for outputting articles
4.) Iterate articles array in your view


Messages In This Thread
Database Powered Template Parser Variable Pairs? - by El Forum - 08-31-2010, 06:57 PM
Database Powered Template Parser Variable Pairs? - by El Forum - 08-31-2010, 09:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB