Page 1 of 1

framework cakephp

Posted: Sat Nov 11, 2006 11:08 am
by dme69
Hello all,
I'm working with cakephp framework and i want to know if you know :) how to use a such framework to make modules for cmsms ?

Dominique

Re: framework cakephp

Posted: Tue Nov 14, 2006 1:38 am
by tsw
as cmsms is a framework itself and two frameworks wont usually mix well together I think this is close to impossible, please tell if you get it working

Re: framework cakephp

Posted: Thu May 03, 2007 8:59 pm
by dingonv
While it may not be feasible to build modules using cake, and i don't think i would advise it anyway, it is more than possible to very easily use your cake output in your CMS-MS site.

custom usertags allow you to get the cake processing easily
include('http://yoursite/cake/controller/action/params')

call anything you want.
oh, you want to actually get the data that cake creates? well, CMS-MS just becomes your view in that case.

in your cake controller, instead of '$this->set'ting your variables
serialize the results and echo them at the end of the controller action and exit so no render is performed.
in cake controller, in whatever action:
$data = $this->Model->findAll();
echo serialize($data);
exit;

in your custom tag in CMS-MS use this php:
$data = file_get_contents('http://yoursite/cake/controller/action');
$data = unserialize($data):

bingo.

i prefer to set my layout to null in cake, and just echo the formatted results with cake's views and not worry about manipulating variables in CMS-MS.

Now, i am sure there is a way to create a helper of somesort, in cake, that uses CMS-MS features in depth, but i didn't think it worth the hassle.

i just setup the admin of my cake side to use the same auth tables as CMS-MS

Re: framework cakephp

Posted: Fri May 04, 2007 2:32 am
by savagekabbage
dingonv:

That is very interesting idea to use CMSMS as the "view" for CakePHP.  I had not thought of that before, and will definitely be trying this on some applications in the future.

Re: framework cakephp

Posted: Fri May 04, 2007 6:09 am
by cyberman
savagekabbage wrote: and will definitely be trying this on some applications in the future.
Maybe you can tell us something about results  ;) ...