Binu a écrit :

I'm a newbee too, but I think I could answer to some of your questions :

> 3.How can I switch to different template layouts (as like in joomla) ?
> In cake, we are placing the image files, css etc in separate folders,
> so how can I create a template layout easily without placing the files
> in separate folders ?
>   
That's not really a problem. If you write your own template (css and 
layouts), there will have to follow common rules.
For instance, you will decide where to store all the images (in the same 
directory )
Of course, if you plan to use any templates, you can't wait for them 
they work at first time !
I found one day a piece of code to change the layout "on the fly". So it 
must not be too hard.
> 4.There will be different user groups and users will be in multiple
> groups. And the admin should be do assign some permissions to those
> groups.(For example like in Joomla the articles can be assigned to
> some user groups with add / edit / publish etc permissions). Is there
> a similar functionality in cake ? And which will be good to track the
> user sessions (files or database) ?
>   
You can use ACL ou Auth component. But, before, you must define what you 
want to do exactly. How the rights will be dispatched between the users 
and the groups ?. Then, you'll be able to compare it with what these 
modules (or others) offer you.

> 5. Hope cake 1.2 supports internationalization by default. How can I
> implement this to different modules and templates ? For example if the
> admin change the language, the whole site should be changed to that
> language.
>   
It depends on how you handle this ! First, the differents translation 
for a sentence are stored in files and Cake choose the right one 
according to the language the user use.
The language is stored in the configuration. Of course, if you store in 
the core.php the language, it will be the same for all the users.
However, if you detect or store a "preferred" language in a profile for 
each user, you can change it by using :

Configure::write('Config.languages', $languages);
Configure::write('Config.language', $language);
Configure::write('Config.langCode', $langCode);

The change is made only in memory, no in the core.php file.
> 6. Where can I write common code ? For example, two controllers are
> using the same code for saving the records into the database (here all
> fields are same only table name is different). Can I use requestAction
> for this by writing the code in one controller and calling it from
> another controller ? Or should I use components for this ?
>   
You say that "all fields are same only table name is different". Maybe, 
but I think that is just "luck". That's two different tables, so two 
models, controllers....
I'm not sure it's worth sharing the code for this example, but I may be 
wrong. Anyway, you can still write your own library and shared code as 
you did before with PHP. Then, depending on the purpose of this code, 
you can decide to use it for all the controllers, models or the whole 
application (including a "use/require" statement in app_controller.php, 
app_model.php or bootstrap.php)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to