Right now, all behavior callbacks are executed only on 'primary'
models, so there are only 2 possible solutions:
#1
extra query - don't fetch associated group data by User->find() but
call Group->find() with condition on known group ID (from previous
User->find() query)
#2
bind association Group
Hi, You should search this forumfor 'requestAction' first, IMHO. Then
read implementation of Object::requestAction(), Dispatcher::dispatch(),
Dispatcher::_invoke() and Dispatcher::start(). Source code will give
You best possible informations - CakePHP is about 150 files only ;-)
> If you do a req
One of possible reasons could be: NiftyCube doesn't require
prototype.js, so check 'weight' of example code at
http://html.it/articoli/esempi/articoli_pro/nifty2/nifty.js
I can't use NiftyCube for my work because of it's license, but I do
like it ;-)
--~--~-~--~~~---
To be exact:
- I don't need (but I can live with) language in URL for actions which
are rendered in browser (I can store them in session/cookie)
- I need language in URL for webservices or for devices with no
session-id save mechanism (no cookies, no trans-sid) - in this time I'm
just filtering th
fter nate's promised changes in router, as I'm quite
curious how will above solution with language in URL interfere with
admin/bare/webservices/plugins default/user-defined routes.
Excuse me, please, if I'm not able to express myself so perfect in en
:)
Thanks again and have a nice d
Hi AD7six,
thank You for Your idea, but ;-)
- I don't think You can access session variables in
cake/config/paths.php (or: without some problems, or: without cake's
session security checks) - class CakeSession is not declared in time
this file is parsed
- CACHE constant is used not for view
s obesity.
Thx, mouth.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PR
Remember: belongsTo association is only twin/complement for association
hasOne or hasMany
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.
hasOne?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more optio
I assume You will not need ProfilesController any more.
Your actual position in process of exploring CakePHP makes me smile, as
there are many sweeet surprises ahead on Your road ;-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
You never heard about model associations, did You? ;-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group,
Similar answers as in Your other thread about components in models,
Simplerules. Best advice for You: spend some time with
http://manual.cakephp.org/ my friend.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
Simplerules wrote:
> But how can I use it in a model?
To be perfectly exact: try to rethink Your application structure,
please. If You want Your model will co-operate with some component,
drive this behaviour from controller or from this component - Your
component can implement method
startup(&$
You can not. Model 'doesn't know' about controller (or it's component)
or view (or it's helper). Model is only interface to repository of data
(database/filesystem/network...) and has to be completely driven from
controller (in some special cases is usable use model in different
places then contro
Brian French wrote:
> Is there a way to set it in the config for the app?
Just make file app/app_controller.php with this content:
> (i use dreamweaver and want to keep the code highlighting, etc.)
I don't understand what is matter :(
--~--~-~--~~~---~--~~
You
> $Route->connect('/'.$language.'/:controller/:action', array('language'
> => $language));
has to be
$Route->connect('/'.$language.'/:controller/:action/*',
array('language' => $language));
--~--~-~--~~~---~--~~
You received this message because you are subscribed
> Any ideas?
//file app/config/routes.php
$routes = array(
'/' => array('controller' => 'pages', 'action' => 'display', 'home'),
'/page/*' => array('controller' => 'pages', 'action' =>
'display'),
'/language/*' => array('controller' => 'pages', 'action' =>
kitten wrote:
> This works fine, except for saving $lang to session -- the session is not
> yet available at this point.
pr(get_declared_classes());
in routes.php shows me class CakeSession is declared already
--~--~-~--~~~---~--~~
You received this message beca
Felix Geisendörfer wrote:
> It's insane!
I have to agree with every word in Your post, Felix.
For all experimentators with variable $from_url in
app/config/routes.php - dont't forget some things:
--> caching mechanism is URL based, so if You will play with URI in
bootstrap.php and with $from_ur
> Working solution is here:
> https://trac.cakephp.org/ticket/1281
This behavior looks to me like a serious problem, so I think this
ticket should be marked with higher priority then 'low' :(
--~--~-~--~~~---~--~~
You received this message because you are subscri
ad 1)
create file app/views/test.php with content:
and in Your controller You have to set
var $view = 'Test';
ad 2)
try visit http://cakephp.org/search?q=smarty
BTW: You must have serious reasons for using Smarty in CakePHP IMHHO.
--~--~-~--~~~---~--~~
You r
Hi AD7six and thanks for Your answer.
This is exactly what I was afraid of, as it looks I have to define all
my custom routes again and again for every language just in
app/config/routes.php.
And - I really don't want to fight again ;) with $base and similar
properties of view/helper instances j
I think You misunderstood my need.
- I want to use caching of some views (controller's actions)
- view (controller's action) can produce more then one output - in
dependency of selected locale - I'm using I18n and L10n classes from
CakePHP 1.2 with current trunk code
I can not use with every te
Hi all,
view caching is fine, but thing I'm really missing is something like
$cache_id in Smarty template engine world. If I understand CakePHP's
caching well, it is URL-based, so correct me, please:
if I want to use caching of views and want to have as many caches for
one view as I have languag
> Hmm. But is there a possibility to use one instance of Component in few
> Controllers? That solution would be nice.
You can turn Your component to singleton and then use static call
(example) MyComponent::getInstance().
OR - as mentioned in my previous post - Your component can use
ClassRegist
> Is there a possibility to do that?
There are several possibilities.
- You can pass them as items of assoc. array - parameter of
requestAction() method
- You can save them in session by session component or session helper
- You can use class ClassRegistry
http://api.cakephp.org/class_class_regis
26 matches
Mail list logo