I just need someone to advise if on right track or not with my code.
In this case, when I create a record in one table, I need to create
three related records in another table.
I have used the $uses clause to set other models in use.
from users_controller =
Nice work!
Maybe you should post this on cakeforge.net as a snippet, or on
wiki.cakephp.org? It will get lost quite soon here on the group.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post
Nice work, this is definately useful. Thanks for posting it!
--~--~-~--~~~---~--~~
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
This discussion helped a lot, thanks. I understand the flow better --
one controller instance is created and lasts the lifetime of the
request.
I implemented nate's suggestion because if I tell my UserController not
to redirect then I won't capture the case of not-logged-in users going
to /user/e
I am new to Cake but have prototyped a few simple apps.
I am puzzled by the dispatcher strategy that maps URL directly into
function names.
e.g. http://mycakeapp/control1/action1
maps into a direct method call on action1 of class control1
This means that many function names that cannot b
I've used the blog tutorial to help me create my first MVC called
mtypes
You can see it at: http://members.nzpif.org.nz/index.php/mtypes
I can list, view, add but I can't get edit to show. My host has the
.htaccess bug (waiting for upgrade) so I'm using the long names but
that's ok. This is for
Very nice!
I'm not very fan of templating engines(too limitating imho), used
smarty & flex in the past.
I believe tho that for designers, php isn't that intuitive.
So this sure would help.
Best regards
Cake!
--~--~-~--~~~---~--~~
You received this message because
Quite a few of the things I expected to be very difficult with CakePHP
have actually been "a breeze." Well, not a breeze, but doable. Anyway,
no fanfare. Here's how to integrate mapping with your application.
Add the data fields
I'd recommend fields called "latitude" and "longitude," of the type
Thanks for your time.
It was realy easy like you wrote. I just defined two $belongsTo
accociations like this (I changed label "courses" to "rides")
var $belongsTo = array(
'City1' =>
array('className'=> 'City',
'
class CheckAccessComponent extends Object {
var $components = array('Session');
function startup (&$controller)
{
//this is called automatically
$this->controller =& $controller;
}
function isPerson($notUserRedirect = '/people/login') {
if (!$this->Session->check(
I have a simple component that checks if a session variable is set. If
it isn't set, I want to redirect the user elsewhere. However, I get an
error when I call $this->redirect('place'); What's the solution?
Example:
class CheckAccessComponent extends Object {
var $components = array('Ses
> I want my action to send a content-disposition header to make the
> browser open the file download dialog rather that displaying the data.
> I order to do so I need cakephp to bypass all layouts, just write the
> data to the output buffer and than send the appropriate headers
> (content-disposit
Well, yeah, we got it sorted (see above).
--~--~-~--~~~---~--~~
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 t
modfather wrote:
> sorry - app_controller.php is in app/controllers/app_controller.php
Shouldn't this be in the main app directory? Mine is, anyway.
-Scott
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
P
Just send the header(".") in your action within your controller ,
write the data to output buffer, and finally do an exit() to disable
layout and timerwatch in debug mode
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Hi,
I want my action to send a content-disposition header to make the
browser open the file download dialog rather that displaying the data.
I order to do so I need cakephp to bypass all layouts, just write the
data to the output buffer and than send the appropriate headers
(content-disposition,
Hmmm, I don't think this is normal. If you continue to experience this
issue, please post a ticket to trac.cakephp.org, along with a piece of
sample code to reproduce the issue. Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
when using in my controller:
var $cacheAction = true;
it always shows the flash page , even in debug mode = 0.
Is this the normal behaviour ?
when I use var $cacheAction = '1 day'; , as suggested in the manual ,
I get the very same page i saved (and not the page i told cake to
redirected).
Hi Jacek, I think a workable solution would be to override the Model
contstructor, set the finderQuery as appropriate, and call the parent.
That way it is set as you want it ;)
Hope it helps, cheers,
AD7six
--~--~-~--~~~---~--~~
You received this message because
glad you got it.
modfather wrote:
> thanks for your efforts - yeah something simple - i am sure its
> something we all feel, ie you can't see the wood for the trees.
>
>
> >
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
OK thanks.
It works, but I still can't set current language_id in finderQuery.
Current language_id is stored in session and can be chanched by user.
Is finderQuery constant ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Marcelo, consider yourself lucky. Stay away from the evil that is
ASP.NET... I've been developing websites for 6 years and I absolutely
struggled through the class trying to figure out the very strange
microsoft oddities thrown into ASP.NET. You wouldn't believe how
involved it is just to put a dr
Hi Jacek,
In your association defention, you can define the "finderQuery", such
that it only returns the current language version. I don't know too
much about cusom associations, but again, it's documented in this link:
http://wiki.cakephp.org/docs:understanding_associations#associations_notation
Hi Jacek,
Not too dificult I don´t think (don´t create 2 tables for Cities!),
Just browse here:
http://wiki.cakephp.org/docs:understanding_associations#associations_notation.
Note that for each association ( you have 2 belongsTo for Cities, and 2
HasOne for Courses) you will need to define the
Thanks for the explanation! And just for the sake of curiosity, I never used ASP.NET... never used microsoft technology to build websites and probaly won´t anyway (*cough* cake *cough*) :)FFighter.
On 5/25/06, Bret Kuhns <[EMAIL PROTECTED]> wrote:
Ahah, after just finishing a semester on ASP.NET I
Hi. I'm thinking about model for bus courses between cities.
I have 2 tables (cities, courses). Cities table has 2 fields
(from_city_id, to_city_id). Both fields are foreign keys to cities
table.
How to model this association? Is it possible?
Maybe I should have 2 tables with cities (fromCity an
Hi all.
I have database structure like this
Content(id, name)
Contentdatas(id, data, content_id, language_id).
Contentdatas has multilanguage values of content.
How to read content instance with only one contentdatas (depends on
active language_id stored in session)?
Standard read method retur
Since you tried this, and got the expected result with your new piece
of code, this idea is ripe for a Ticket.
Thanks for taking care of details, mate.
-Olle
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
P
28 matches
Mail list logo