Welcome Guest, Not a member yet? Register   Sign In
Extending the Loader class (more or less)
#3

[eluser]Unknown[/eluser]
The display_override hook will give me access to a string that will contain all the generated output (right? Big Grin). I find it a bit harder to process that string and change the layout, than just use another view for a different layout Smile

Let's consider the following directory structure:

application/view/ <-- will contain the "default" views.
application/view/themes/ <-- will contain a subfolder for each theme.
application/view/themes/myfancytheme/ <-- will contain all views that are different from the default one.


If I don't set a theme, then the "login.php" view will be loaded from the application/view/ directory. If I set the theme to "myfancytheme", the the "login.php" view will be loaded from the application/view/themes/myfancytheme/ directory.

Ofcourse, the code I posted earlier is just the rough idea, still needs checks (if the theme directory exists and so on), maybe a fallback mecanism (that will allow me to rewrite only some views) etc.


Messages In This Thread
Extending the Loader class (more or less) - by El Forum - 10-07-2007, 08:15 AM
Extending the Loader class (more or less) - by El Forum - 10-07-2007, 08:49 AM
Extending the Loader class (more or less) - by El Forum - 10-07-2007, 09:09 AM
Extending the Loader class (more or less) - by El Forum - 10-07-2007, 11:14 AM
Extending the Loader class (more or less) - by El Forum - 12-13-2007, 03:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB