joined:July 23, 2013
Hello guys,I'm building small MVC based blog(site) project,and I'm bit stuck with logic.My goal is to to get it right...
So,on normal no-MVC projects that I have done the structure of website looks like this.
---overallheader(which consists from header,logo,navigation,etc)
--- overall footer(sidebar,etc)
The logic of MVC is just to pass data to view that we got from model using controller.No such things as database queries in view(etc..).
And the thing is that I don't understand is how to make navigation in template.I must grab it in every controller and send it in view?Also with some related posts or something like that.These things are somewhat independent from content(on non-MVC project I just require prepared file like navigation.php ).And I would have to repeat the code a lot.Then I will break the rule don't repeat myself(DRY).
I didn't find any material on the internet that will explain how to tackle this issue.
Tnx in advance guys!