Welcome Guest, Not a member yet? Register   Sign In
how manage or create microsite under one app? anybody
#1

[eluser]umefarooq[/eluser]
Hello everybody i have one question is how can we manage or create microsites under one CI installation i have one main site which is running perfectly, i want to create microsite under this main site for some temporary event with different theme and menu how we can manage it any solution or example will be helpful,

i have site running on my
www.mymainsite.com

and i want microsite like this

www.mymainsite.com/microsite

every thing regarding micrsite under this url
#2

[eluser]Mischievous[/eluser]
There are a couple ways of doing it,

1) If you want it to have its own codebase you can setup a seperate application folder and run some .htaccess magic just re-route the microsite url to the second application folder.
Code:
RewriteCond $1 !^(index\.php|microsite\.php|robots\.txt)
RewriteRule index\.php index.php [L]

RewriteCond $1 !^(index\.php|microsite\.php|robots\.txt)
RewriteRule microsite\.php microsite.php [L]

RewriteCond $1 !^(index\.php|microsite\.php|robots\.txt)
RewriteCond %{REQUEST_URI} /microsite.*
RewriteRule (.*)$ microsite.php/$1 [L]

RewriteCond $1 !^(index\.php|microsite\.php|robots\.txt)
RewriteCond %{REQUEST_URI} !/microsite.*
RewriteRule (.*)$ index.php/$1 [L]

2) If you want it to be able to share libraries/views setup a sub folder in the controller as well as the models/views controllers

Code:
../application/controllers/microsite
../application/models/microsite
../application/views/microsite

-or-

you could setup a module seperation with either matchbox, HMVC, or module seperation and just run the sub sites as your "modules". Either way would allow you to share libraries and code.

As for the templates/themes there is a "codeigniter Template Library" you can google and download that will allow you setup multiple templates and assign each to each microsite you have.


Hope this helps!
Good Luck!




Theme © iAndrew 2016 - Forum software by © MyBB