Welcome Guest, Not a member yet? Register   Sign In
MVC Question
#1

[eluser]Matt Crowson[/eluser]
If I have static information on a page does that go in the model, view, or controller?
#2

[eluser]Scriptor[/eluser]
By static information I'm guessing you just mean some static HTML. That should go into the view, but remember to let your controller load the view first.
#3

[eluser]sikkle[/eluser]
Indeed, even if not everybody like to do it.

Create a view, that you will load in any view where you need that.

For more advanced partial, you can create modules with Modular Extension indeed.

good luck !
#4

[eluser]Matt Crowson[/eluser]
Thanks. I'm still on the learning curve for this. Mind showing me a link where I can read about creating modules and with modular extension so I can see if that best fits my needs.
#5

[eluser]Scriptor[/eluser]
Try this:
http://codeigniter.com/wiki/Modular_Extensions_-_HMVC/
#6

[eluser]esra[/eluser]
[quote author="Matt Crowson" date="1212887884"]If I have static information on a page does that go in the model, view, or controller?[/quote]

You can put the static information in a language file and load the language file in your controller, autoload it, or load the language file in a base controller. You can use the line method to include language strings in your views or assign the language strings to variables in your controller using the set method and then embed those variables in your views.

For Matchbox, you can add a language directory like so:

modules/modulename/language/english

HMVC (Modular Extensions) offers a similar solution.




Theme © iAndrew 2016 - Forum software by © MyBB