C5 in a subfolder of a CodeIgniter site

Permalink
Hi,

I'm building a new site which will have the initial customer facing pages coded through CodeIgniter's MVC framework.

I wish to also build a large section of the site using C5's CMS. My plan is to create a subfolder for C5 and have all the CMS stuff in there.

Does anyone see any major problems with this or should they co-exist nicely? My worry I suppose is that with .htaccess files in the root directory and the C5 subdirectory things might get confusing. Any thoughts/help/gotchas appreciated,

Folder structure example:

/.htaccess and CI stuff
/subfolder/C5 stuff

cheers,

Mike

mikeb
 
jordanlev replied on at Permalink Best Answer Reply
jordanlev
You shouldn't have any problems with this -- I think the .htaccess in the subfolder will override the one in the parent-level folder (although depending on the rules set up in the parent-level one, you may need to add a line to that telling it to ignore requests for the c5 subfolder, so they "pass through" to c5).

I haven't done this with codeigniter but I do have a few setups where wordpress lives in a subfolder of a concrete5 site, and I haven't experienced any problems related to .htaccess.

Can I ask why you want the customer-facing pages in CodeIgniter instead of just making them C5 pages? Not trying to dissuade you from doing this or claiming that "C5 is the best for everything period", but wondering if maybe it's not necessary in your specific situation (because generally when I think of customer-facing pages I think of fairly static informational content, whereas the interior pages generally have more specific functionality).

HTH

-Jordan
mikeb replied on at Permalink Reply
mikeb
Thanks for the detailed response Jordan, I was wondering particularly about how the .htaccess would behave. I'll report back here when I've got the two working together in perfect harmony!

As regards using C5 for the customer facing pages - I probably didn't explain that properly. The whole site is customer facing (apart from an admin backend for orders and stuff) but there are two parts to the site.

There will be a lot of informational pages which the admin will need to be adding and updating content to. Then there is a search function which uses JQuery, JSON data, Google's V3 api etc. to build searchable maps. This searchable map pulls it's JSON data from my DB via php (and I want to use CI for it's pretty URL parsing and more importantly for it's RPC Server/client classes to server up the data on this re-do of one of my existing sites so I've no objection to integrating all that stuff using C5 but although I've built now a half dozen sites or so with C5 I'm not sure about integrating the JS/PHP/Google stuff into it. If it's possible great but for the sake of speed I don't have time to experiment too much. Also, this part of the site is completely dynamic so no need for CMS.

Sorry about the long reply - just because you were kind enough to seek more detail. Just out of interest, would you still use C5 for this part of the site?

"... or claiming that C5 is the best for everything, period" - Lol! I'd certainly forgive you for that - it's the best CMS I've ever used, period!

cheers,

Mike
jordanlev replied on at Permalink Reply
jordanlev
Sounds like a cool project! Based on the requirements and the code you already have written, I would agree that your approach makes the most sense.

If I were starting completely from scratch I *might* consider doing it all in C5 (the "single_pages" functionality provides a good way to do dynamic pages without the CMS getting too much in your way -- it's a loose MVC framework as well, although not as fully-backed as CodeIgniter). But I might not depending on how crazy the non-cms functionality was.

Let me know if you run into .htaccess troubles as I'm sure there's a solution even if it doesn't work out of the box.

Best,
Jordan
mikeb replied on at Permalink Reply
mikeb
Thanks Jordan,

I would (almost) consider C5 for that bit of the project too except that I haven't looked too closely at the single_pages function, so yep, for this one I'll sit it out. Thanks for the offer of help on the .htacces, I might well need some!

cheers,

Mike