First, get the subdomain name from $_SERVER'SERVER_NAME' : list($subdomain) = explode('. ', $_SERVER'SERVER_NAME', 2) Then choose what template to use based on the subdomain: Replace this with a switch() statement if you want to choose another way $this->template = 'templates/'. $subdomain The above code should be placed in the Controller::before() method before you call parent::before() This assumes that you are using the Controller_Template or an extension of it.
First, get the subdomain name from $_SERVER'SERVER_NAME': list($subdomain) = explode('. ', $_SERVER'SERVER_NAME', 2); Then choose what template to use based on the subdomain: // Replace this with a switch() statement if you want to choose another way $this->template = 'templates/'. $subdomain; The above code should be placed in the Controller::before() method before you call parent::before().
This assumes that you are using the Controller_Template or an extension of it.
May anybody can help me: stackoverflow.com/questions/2764543/koha... danzzz, there are a few ways... (i don't have time to go into detail.. so i'll give a quick go here..) .. A) use URL rewriting to map bla.site. Com to site. Com/bla (and bla.com+bla.com to bla.Com/www) ... use that first param as the trigger... then load a different module at the top of the stack so it can override anything from a lower module - this assumes anything that is overridable is kept in a module, otherwise, you can use it as a trigger any where in the code... and B) is really the same thing, but using that param as the view name or similar... whenever I have something like that, I tend to leave my application folder empty, and have an application module near the top of the module stack.. that way, I can load a "skin" module higher up and have the cascading FS do all the hard work... keep in mind that "skin" modules etc will need a strict set of rules and interfaces, if you make a change to the app, you need to know all the skins still work...
IRC nicks and formatting stripped ;) ah well - hopefully it still makes sense to anyone else reading it.. – Kiall May 4 '10 at 11:28.
I have a kohana v3 app. 2 subdomains pointing to this app. What I have to setup that kohana uses a different template if the app called with subdomain2.example.com?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.