At the moment I use Auth Component for users to login / logout - ACL
is defined to sort between user groups (Guests, Users, Admins) - with
obvious restrictions - Admin being able to access everything, the user
can only access edit in the users controller and the guest being able
to see just the
http://book.cakephp.org/view/1390/Automagic-Form-Elements
^^ It's possible for me to make sure a user doesn't choose beyond a
minimum and maximum years, but whats the best way of putting limits on
the months and days as well? Basically I want to make sure a user can
only select a date in the
Just wanted to ask what would be the best way of doing this?
Essentially if a person logs in from one location, and then a while
later from the other - I want them to immediately be logged out from
the first location.
--
Our newest site for the community: CakePHP Video Tutorials
I haven't actually made models for the Join table - I don't think you
need to for a HABTM relationship
On Jun 15, 1:41 pm, Rob Maurer robmau...@gmail.com wrote:
Interesting. What would happen if you put the validation in the model
for the join table?
On Jun 14, 3:17 pm, Shaz shazam
Double check the URL you're sending the POST request to - and ensure
the controller action is setup to receive it; especially if you're
using Auth / ACL.
Also post date in cake should be available in $this-params.
On Jun 14, 3:53 pm, Ivan Rocha ivan.cr.n...@gmail.com wrote:
Hi,
I'm trying to
http://book.cakephp.org/view/1545/Preparing-to-Add-Auth
At the bottom it explains how to allow actions currently not
initialised as ACO's.
On Jun 13, 7:21 pm, taq taqman...@gmail.com wrote:
now I use acl component in my webapp
when I add new action I got you unauthorize to access this location
Try the threaded find? But list with fields specified correctly
should do the job. Read the documentation carefully:
http://book.cakephp.org/view/1022/find-list
On Jun 11, 3:33 am, cake-learner sh.koiz...@gmail.com wrote:
Can I get the search result so that it returns the id as key?
so if you
Use pure javascript vs the JS helper for jQuery - should sort it.
On Jun 9, 8:48 am, OldWest ja...@jasonwydro.com wrote:
I could be missing something severely here, but this is just not adding up.
I built an ajax form which is working perfectly fine with ProtoType and
Scriptaculous.
I am
I have User HABTM Language, and i want to ensure during a User add /
edit they choose a minimum of one language, upto a maximum of 3. In
the user model, for $validate I've tried:
'Language' = array(
'multiple' = array(
'rule' =
that validation; where I only want the
users to...
Thanks!
On Jun 14, 8:14 pm, hunny saurabh85maha...@gmail.com wrote:
Write the Validation Rule in Language Model instead of User Model
On Jun 14, 9:56 pm, Shaz shazam...@gmail.com wrote:
I have User HABTM Language, and i want to ensure during
I know this is possible:
site.com/controller/action/key1:value/key2:value etc
Is there a way to add more than value to a key? For example:
site.com/controller/action/key1:value1|value2|value3/key2:val1|val2/
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
(base64_decode($this-params['named']['yourkey']));
--
Lep pozdrav, Tilen Majerlehttp://majerle.eu
2011/6/5 Shaz shazam...@gmail.com
I know this is possible:
site.com/controller/action/key1:value/key2:value etc
Is there a way to add more than value to a key? For example:
site.com
Use sessions to store your navigation data / parameters and call the
appropriate method?
On May 31, 1:44 pm, Jeremy Burns jeremybu...@classoutfit.com wrote:
I've raised a similar question before but got no responses, so I'll
try something more specific.
I have an application that is pretty
I have the following relationships (habtm both ways):
User HABTM Groups
User HABTM Events
User HABTM Locations
So for example - I want to get users that belong to groupA, groupB and
locationX and paginate the results - whats the best way of
implementing it?
I'm trying to avoid using
I've just posted a similiar query!
Googling around has given me the bindModel() method - which you can
read at the bottom of the page here:
http://book.cakephp.org/view/1044/hasAndBelongsToMany-HABTM
But I wasn't able to get it to work for me. There's also a method
using manual joins and
Index it!
http://www.mainelydesign.com/blog/view/speeding-up-cakephp-acl-component
On May 30, 7:29 pm, Tufla hocanaste...@gmail.com wrote:
After apply the change, the reading process has been improved a
little, but the writing process continue taking a lot time :S BTW I
checked and the AROS
You need the relationship both ways:
Item hasOne Unit
Unit belongsTo Item
Add a few items and units into the database. Then go back to the item
controller, edit action and make sure you get a list of all the units:
$this-Item-Unit-find('list'));
Hopefully that helps.
On May 29, 11:53 pm,
Should be able to find what you're looking for at:
http://book.cakephp.org/view/1390/Automagic-Form-Elements
On May 29, 1:08 pm, Jae Choi hybm...@hotmail.com wrote:
Hi all,
Is there a way we can show multiple columns to select when selecting
belongsto values in edit.ctp view rather than just
Was it an sql dump or just the schema? It might be a case of
rebuilding the ACL...
On May 27, 5:11 am, 8vius lmd...@gmail.com wrote:
Hey all, I'm new to CakePHP and I'm using it at work. I have a Mac
running Mac OS X Leopard at work as well as at home and a PC at work
as well.
I have the
/Replication-load-balancing-suppo...
On May 6, 3:18 pm, Shaz shazam...@gmail.com wrote:
Just wanted to ask if anyone knows how best to do this - essentially I
want to be able to send all the cakephp mysql selects (read) to a read-
replica database and all the inserts/deletes/updates (writes
Just wanted to ask if anyone knows how best to do this - essentially I
want to be able to send all the cakephp mysql selects (read) to a read-
replica database and all the inserts/deletes/updates (writes) to the
master database.
For a bit of background - I've been tasked to build a site that will
Can you put up your $this-find() statements and the results you get
with them?
I would've thought (in the Agreement Model) you could do something
along the lines of this-Definition-Article find(all)
conditions(article.field = '%string%') contain( user, agreement,
definition) groupBy(definitions).
http://book.cakephp.org/view/1414/checkbox
http://book.cakephp.org/view/1031/Saving-Your-Data
^^ Have a quick read - it's explained there.
On Mar 21, 10:45 am, Tapan Kumar Thapa
tapan.th...@hindustantimes.com wrote:
Hello Group,
I am stuck in one situation and i don't know how to come out
Hi all,
I've followed the instructions at
http://book.cakephp.org/view/915/Advanced-Installation
and essentially done the following on my Mac:
0 - Enabled mod_rewrite in my httpd.conf
1 - Forked CakePHP from git (cakephp/cakephp) into /usr/local/cakephp
2 - Setup Aliases for the cake console
I get the following when I try and run 'All Tests':
Fatal error: Cannot redeclare class Article in /usr/local/cakephp/cake/
tests/cases/libs/model/models.php on line 283
I've setup cake slightly different (don't know if that's a factor -
but you can see how i've done it here:
http://www.notgoingtouni.co.uk - on it's launch it took traffic more
than what you describe and cakephp didn't crumble one bit.
Just make sure your hosting is up to scratch and be really good
friends with a sys admin!
On Mar 20, 11:39 pm, cricket zijn.digi...@gmail.com wrote:
On Sun, Mar 20,
http://book.cakephp.org/#!/view/917/Apache-and-mod_rewrite-and-htaccess
On Mar 10, 2:24 pm, rethab rethab...@gmail.com wrote:
Does look like mod_rewrite was not activated. Did you check the
activated modules on your server?
On 10 Mrz., 06:41, cake_beginner honeynativi...@gmail.com wrote:
i
Sounds like a challenge! The only way I can think of is to write a
custom validation rule that checks each of the submitted Product Names
- have a read at:
http://book.cakephp.org/#!/view/1179/Custom-Validation-Rules
Let us know how you get one! Might be handy in the future...
On Mar 9, 2:30
Have you tried $this-Lot-paginate() ? Just seems like you're
skipping the relationship if you're trying to paginate 'Lot' in
'Watches'?
On Mar 7, 11:44 am, Angelo angelo.maior...@gmail.com wrote:
Hello,
I have a big problem, i've got the following structure:
var $hasAndBelongsToMany = array(
Have you tried $this-Lot-paginate() ? Just seems like you're
skipping the relationship if you're trying to paginate 'Lot' in
'Watches'?
On Mar 7, 11:44 am, Angelo angelo.maior...@gmail.com wrote:
Hello,
I have a big problem, i've got the following structure:
var $hasAndBelongsToMany = array(
Just a random thought - I've been helping a friend get to grips with
cake and I know later on he *needs* to be introduced to test-driven
development;; wouldn't it be more interesting it to teach the
methodologies the other way around? For example, the first thing he
would ever write would be a
http://ckeditor.com/ - I have a minimalist version of it working on a
few of my cakePHP websites.
On Mar 10, 2:22 pm, rethab rethab...@gmail.com wrote:
You might want to use this PHP
function:http://ch.php.net/manual/de/function.nl2br.php
As for WYSIWYG Editors: I thought TinyMCE could be
It's better practice to use model relationships rather than $uses.
i.e. $this-User-Drug-find();
On Nov 12, 4:30 pm, naidim nai...@gmail.com wrote:
For the homepage controller, if User and Drug are not related but you
want to use those models, you have to include them both. Maybe I
should
Are you using any containable behavior? Or is the data being passed
along correctly when using $this-Paginate() - the main error that
jumps out me is: Argument #2 is not an array.
On Nov 9, 6:43 pm, J. Argyl Plath jeremy.pl...@homefront.tv wrote:
My User model belongsTo Department. When looking
I've only just gotten started with TDD - don't think many folks on
here use the tests, but I do know exactly what you mean. I haven't
come across anything better - it might be a case of having to improve
it ourselves...
On Nov 9, 1:16 pm, psybear83 psybea...@gmail.com wrote:
Hi all
CakePHP's
Basically whats easier for you - can't think of any standards for
pagination. Keep in mind that you may want to expand on it later on
(add more conditions, fetch more data etc) so keep it flexible.
On Nov 7, 5:12 pm, Dave Maharaj m...@davemaharaj.com wrote:
Not sure if I have been looking at
Just wanted some idea's on how you would build an API for your
application in Cake?
An example of what I'm trying to achieve:
Team A logs on - adds their players, what they scored and how on their
site.
Team B logs on and does the same.
Both sites connect to each other and show the relevant
Also if I remember correctly cakephp doesn't read bolean from a
database?
http://nuts-and-bolts-of-cakephp.com/2008/10/06/cakephp-mysql-tinyint1-confusion/
On Sep 7, 10:11 pm, Miles J mileswjohn...@gmail.com wrote:
Couldn't you just pass 1 and 0?
Also your argument is backwards. True should
Steer clear of facebooks widgets and take the time out to learn their
new protocol. It took me about 4 hours to get the swing of it, and by
the end of the day I had properly integrated facebook into a website
(pulling data, publishing information and so forth).
Google around - there's quite a few. Best bet would also be to search
Google Scholar / ebooks, or pop down to your local library.
On Sep 7, 8:35 am, Kalyana Yogam kalyanayogam.webm...@gmail.com
wrote:
Hi,
I have to take 2 one hour sessions on the following topics:
* Project Design Review
*
Can you put up your code? ... crud really shouldn't be defined in
app_controller - rather in the app/user_controller, it might be a
headache lateron
On Sep 6, 7:37 am, Ernesto e.fanz...@gmail.com wrote:
Hello.
i have a problem that can't resolve.
my app_controller::beforeFilter has a simple
Here's an old article that shows how to do exactly what I want - but
doesn't quite work:
http://bakery.cakephp.org/articles/view/multiple-forms-per-page-for-the-same-model
Any other way of using CakePHPs form validation on different forms? I
have an add, edit function/view/form for my controller
You would be better off building the blog yourself using cake rather
than integrating wordpress :)
On Jul 27, 2:58 pm, euromark dereurom...@googlemail.com wrote:
i once stumpled upon
this:http://bitbucket.org/pixelastic/caracole-bbpress/src/a87149cbba0e
maybe something similar could be
Where does loginRedirect redirect you at the moment? Or no redirects
at all?
On Jul 27, 6:16 am, sebas46825 sebas46...@gmail.com wrote:
hello, i have a problem with the login redirect i dont no why but when
i write the loginRedirect it not redirect me, just show me the login
page and i want to
Read the 1.2 to 1.3 migrating guide - a few things have changed here
and there, enough to cause a few headaches but easily updated.
On Jul 27, 12:10 am, Dave Maharaj m...@davemaharaj.com wrote:
I am upgrading from 1.2 to 1.3 and when I try to login I get redirecting
forever message. I never
Create the DB table and use cakebake.
On Jul 26, 10:44 pm, Anderson Valongueiro
anderson.valongue...@gmail.com wrote:
Hi, guys!
I have a problem. I never before use the pages_controller, because
never need this.
But today i needed create the pages_controller, by first time, and
create the
* I expect to exchange data via JSON (services already in place for
some JS and Flex features) but as the request is not coming from a
browser, how do I get info about the user / phone? Some info are
contained in the HTTP request? How do I parse them?
* Authentication: which the best (and
With my current craze of moving all logic from my models to my
controllers, a slight problem has risen - namely I can't seem to use
$this-paginate() in a Model function thats called in a controller.
$this-find() works perfectly find, and I'm trying to replace $this-
find( 'all', $conditions );
Read up on call backs and the cake's ajax afterRender or
beforeRender/load - it'll give you a better understanding on how best
to you use AJAX.
On 14 July, 08:37, engine radicalet...@gmail.com wrote:
Hi friends,
i dont know this questions has been asked before or maybe straight forward.
But i
(Sorry I meant from my Controllers to my Models!)
On 14 July, 12:12, Shaz shazam...@gmail.com wrote:
With my current craze of moving all logic from my models to my
controllers, a slight problem has risen - namely I can't seem to use
$this-paginate() in a Model function thats called
Oo interesting - it's removed 5 from 'asked' ad added it onto saving
and confusion. Post up the $this-save() code so we can see whats
going on.
On 13 July, 12:01, tersmitten mischa.ter.smit...@gmail.com wrote:
I'm trying to save my $this-data which is (already) a correct array.
But when I do
class Model extends AppModel {
var $name = 'Model';
var $displayField = 'name';
}
Change 'name' to whatever you want to be shown (i.e. 'title' etc)
On 10 July, 20:58, Samueljslg samuelj...@hotmail.com wrote:
Hello friends, I am starting with cakephp, I have a problem, you want
What sort of filtering and for what are you after?
On Jul 8, 10:08 am, james jamesliv...@googlemail.com wrote:
Hi I am also looking for some advice on filtering. Are these the best
tutorials?
thanks.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their
The form needs to be created with a name and then it also needs to
end:
$form-create('FormName');
$form-input( ... etc etc );
$form-end('Submit');
And you should be able to access your form data via $this-
data['FormName'][ inputfield ].
On Jul 8, 1:31 pm, Tomfox Wiranata
Also do a Cake Bake on a model to see how cake itself does pretty
basic Create/Read/Update/Delete.
On Jul 8, 10:17 am, Jon Bennett jmbenn...@gmail.com wrote:
now if i hit the save button i get the error:
UsersController::__updateProfile() cannot be accessed directly
whats wrong here?
Use ternary php operators to check what the user selects, put them
into a variable and attach that into the conditions;
$condition = isset($this-data['Search']['Stars']) ?
array('Offer.flag_stars' = $this-data['Search']['stars']) : '';
$results = $this-Offer-find('all', array(
http://book.cakephp.org/view/74/Complex-Find-Conditions
On Jul 8, 8:21 am, Ernesto e.fanz...@gmail.com wrote:
Hello.
i have this situation:
Order hasMany Insertions hasOne Article
i'm working in OrdersController
i want lo load all Articles with at least one Insertion in a specific
Order.
Easily doable in CakePHP - it may take you a week or two to get around
to Cake's way of doing things but stick with it.
On Jul 7, 2:47 am, maxarbos maxar...@yahoo.com wrote:
I am just getting into learning about cake and wanted to know if I am
going to be able to do the things I am hoping it
Not that I can think of - but it is a controller that should be
collecting data from models and passing them onto a view - not the
view trying to access a different controller/model. And you can call
other models for data from within a model/controller, provided the
recursive relationships are set
User hasMany Post
User hasMany Comment
Post hasMany Comment
Post belongsTo User
Comment belongsTo Post
Comment belongsTo User
On Jul 6, 4:43 pm, Vinicius Núñez viniciusnu...@gmail.com wrote:
How are you? Which way can I show a post, its comments, and users that
commented them? Do you know I'm
Nope sorry - I haven't any points during which I'd need to reorder a
tree, and I'm struggling to think of where I'd need do it.
On Jul 8, 1:02 pm, DragonFlyEye dragonflyey...@gmail.com wrote:
Bump. Does anyone out there have any experience with this?
On Jul 7, 9:04 am, DragonFlyEye
From my understanding - elements are just there as an option to show
common views - such as a site with a top-level navigation bar that's
the same throughout a website. I'm not sure why you would wish to
extend or make us of them as much as you explained above - and using
your analogy of trying to
Try $this-aro-create() instead.
On Jul 6, 1:12 pm, Kanwal enggkanwalj...@gmail.com wrote:
i have one controller in which i have following function:
var $components = array('Acl');
function anyaction()
{
$aro = $this-Acl-Aro;
//Here's all of our group info in an array we
You need to either manually add the ACO to the database or run the
build_acl() function provided in the tutorial.
On Jul 6, 11:03 am, malu star malustar2...@gmail.com wrote:
I have add a function named 'add' in one of my controlller and then i
called that action that time i got this Notice
Interesting - I have come across ActiveMerchant when doing RoR
applications - but never thought about something similar mostly
because the API support of most payment gateways is pretty
straightforward using php...
On Jul 5, 11:51 pm, iamcam (Cameron Perry) mistercame...@gmail.com
wrote:
Has
CakePHP follows the MVC pattern. Each controller has an associated
model and a view - you can specify in the model which database table
to use, or to not use one at all - but unless you specify, you will
keep getting errors.
On Jul 5, 3:57 pm, vaugh...@switchdesign.com
vaugh...@switchdesign.com
requestAction() is bad! Implement recursive relationship between
models and use the find() with contain and conditions!
On Jul 5, 2:38 pm, Ahmet Kemal ahmetkemala...@gmail.com wrote:
Hello,
I have an element that grabs data from mysql. Here is my working code:
Not quite what CakePHP would like you to do - have a read of the
tutorial for a simple ACL application.
http://book.cakephp.org/view/641/Simple-Acl-controlled-Application
On Jul 5, 5:13 am, randy ran...@gmail.com wrote:
it feels kind of yucky...
in order to get my auth+acl setup working, i
CakePHP follows the MVC design pattern - most of the heavy lifting
should be done in the model with the controller just being the
intermediary between the model and view.
Remember: Fat Model, Skinny Controller
http://teknoid.wordpress.com/2009/01/06/another-way-to-think-about-mvc/
On Jun 30,
Very strange - can you put up the code from a controller where the
session does work? I'm assuming they're identical - or they should be.
Also it might be a case of overkill by using both:
App::import('Core', 'l10n', 'Sanitize', 'CakeSession');
And:
public $components =
I'd come if it wasn't so far away from London!
On Jun 30, 3:38 pm, Larry E. Masters aka PhpNut php...@gmail.com
wrote:
Just want to start a thread and see how many people on the google group
would like to attend or are planning to attend CakeFest 2010? This is the
largest gathering of CakePHP
It's the fear of the airfare that's more dominant!
Fingers crossed my little start-up will kick off, and be able to come
to the next one :)
On Jun 30, 3:45 pm, Larry E. Masters aka PhpNut php...@gmail.com
wrote:
Shaz,
Are you afraid to fly? :)
--
/**
* @author Larry E. Masters
* @var
.$html-link[$catName,
You're using a square bracket? Should be:
.$html-link($catName,
On Jun 30, 5:13 pm, saidbakr said@gmail.com wrote:
Hi,
I have a little function in one of my views. This function could not
able to use helpers. For example:
//add.ctp
// some html
?php
function
You'll have to use $_SERVER[] to get your path:
http://php.net/manual/en/reserved.variables.server.php
On Jun 30, 2:45 pm, kaushik kaushikwo...@gmail.com wrote:
I have developed my site in a server where mod_rewrite and .httaccess
are available. I used '$this-webroot' variable for a tag and
Are you following:
http://book.cakephp.org/view/172/Authentication
?
On Jun 30, 11:27 am, brianclark...@btconnect.com
brianclark...@btconnect.com wrote:
Hi
I have configured the Auth component and its working fine. I need to
save a User associated model in the session.
I assume the best
Used the book myself on CakePHP 1.3.2 - had no problems.
On Jun 29, 7:10 am, Jeremy Burns | Class Outfit
jeremybu...@classoutfit.com wrote:
There are more differences than that, but if you read the migration guide
(http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3) you'll
It's actually pretty cheap now to get your own VPS, and set it up
exactly how you want to.
I can recommend both HostingZoom + 11, faultless service over a
number of years for an excellent price.
On Jun 29, 5:59 pm, nurvzy nur...@gmail.com wrote:
I'm a fan ofhttp://www.downtownhost.com.
On Jun
There's been a lot of discussion about this - use the search box on
the top right.
I personally tend pass the session details as an argument through the
controller:
--- Model ---
function whatEver ($session) {
manipulate $session['User'];
return something;
}
--- Controller ---
function
Can you be a bit more detailed on what you are trying to achieve?
Outputting html in php is a simply matter of using echo 'html /
html';
On Jun 29, 7:25 am, sunny ravite...@gmail.com wrote:
Can anyone tell me how to add an html file to php script.
Check out the new CakePHP Questions site
... adding to the above, what's wrong with a little bit of CakePHP
branding?
Most clients I've had don't particularly care about the code as long
as it works, let alone know what a framework is
On Jun 29, 1:59 pm, AD7six andydawso...@gmail.com wrote:
On Jun 29, 5:01 am, Vangel
Try find('list', array(contain = array( 'Model1', 'Model2' )));
On Jun 29, 1:23 am, saidbakr said@gmail.com wrote:
Hi,
From documentation, find may output array like the following:
Array
(
[0] = Array
(
[ModelName] = Array
(
Make a new action in the controller, call it customLogin or whatever
you want, and in there call the function in the model (below), which
would return true/false, and if(true){ do this } else { do this }
For the model:
Make a new function to be called in the controller, use $this-
You can add $this-Auth-allowedActions = array('action'); to the
app_controller.php for all controllers rather than having to set it
for every single controller. Can't think of anything else other than
that.
On Jun 24, 2:52 pm, Melanie Sommer melanie-som...@mailinator.com
wrote:
Hello,
I am
Do you already have a schema going for different users? Then it's just
a matter of creating a new table with id, user_id, recipient_id,
title, and message; cake bake the model/controller/view - add some
authentication and checks to ensure user_id is taken from a session,
recipient ID as an ajax
Try using $this-Form-create() instead of $form-create() in the
view. Also make sure your form helper is enabled in the model.
On Jun 22, 9:36 am, mirfan m.irfa...@gmail.com wrote:
This is the script
?php echo
$form-create(User,array('controller'='users','action'='register'));?
Cake cookies are session cookies. If you want to set browser cookies,
use the php setcookie() function.
http://php.net/manual/en/function.setcookie.php
On Jun 21, 5:50 pm, DragonFlyEye dragonflyey...@gmail.com wrote:
My cookie variables:
function beforeFilter() {
More of a PHP / programming development question:
I have an article that has (Category, Type, User, etc). Below the post
I want to show the related articles, but I want them to relate
together via the common attributes between articles (Category, type,
user etc).
At the moment I have a
Anyone have any documentation on the CakePHP slug? Can't seem to find
much on it - just trying to get my URL's all nice and pretty for
google without having to mess with Routing / creating seperate helpers
and so forth to get 'em tarted up.
Check out the new CakePHP Questions site
$this-User-Photo-find() perhaps?
From my understanding we should use the model associations (which
provide an efficient sql query if i remember correctly) first to see
if it gives us what we want, otherwise use findall/contain.
On Jun 18, 7:21 am, Alan Asher a...@asteriskpound.com wrote:
I have
Also with the find() make sure you have recursive set to -1 or 0 to
cut back on the excess data collection.
On Jun 18, 9:53 am, Shaz shazam...@gmail.com wrote:
$this-User-Photo-find() perhaps?
From my understanding we should use the model associations (which
provide an efficient sql query
http://cakephp.org/screencasts/view/7
On Jun 15, 8:32 pm, jjnn jn.nor...@gmail.com wrote:
Do i have to change the enviroment path to my cakephp console
everytime i need to bake stuff on a new project?
so like
/home/jonas/lampp/htdocs/cakephp_projectA/cake/console
Whoa! So much info! Thanks all; beginning to like cake more and more
day by day.
I settled for using $displayField in the model; am trying to keep the
controller as skinny as possible.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related
Probably something really simple but I can't figure it out / find
information on it:
Got a form (add article) with a drop down list (categories). How do I
get it to show the category names rather than id while still
maintaining the id as the value?
Check out the new CakePHP Questions site
', 'CommentRank'),
'conditions' = array('Comment.article_id' = $id)
)
);
[/code]
That should give you the comments in a threaded format, with the
article and comment rank attached.
Enjoy,
John
On Jun 2, 4:01 pm, Shaz shazam...@gmail.com wrote:
$this-Article-Comment-find
]
$this-Model1-Model2-find(
'threaded',
array('contain' = 'Model3')
);
[/code]
Is the above what is not working?
Have you checked that an association/relationship is defined between
Model2 and Model3?
Enjoy,
John
On Jun 1, 8:14 pm, Shaz shazam...@gmail.com wrote:
I'm trying
Course has many course_tees
CourseTee belongs to course
I thought all model class names be singular and camel cased; as in:
Course has many CourseTee
CourseTee belongs to Course
Might help?
On 2 June, 01:05, jjunior jrede...@gmail.com wrote:
I'm having a problem trying to save/update some
It should be:
Router::connect(
'/blog_post',
array(
'controller' = 'posts',
'action' = 'view',
5
)
);
Notice it's only one array.
On 1 June, 23:07, blasto333 m...@chrismuench.com wrote:
Router::connect(
'/blog_post',
array('controller' = 'posts'),
Try:
?php if (!empty($user['social_media']['linkedin'])):?
td valign=bottom align=center
?php echo $html-link($html-image('linkedin.gif', array ('alt' =
'LinkedIn' , 'align' = 'bottom')), {$user['social_media']
['linkedin']}, array(), null, false); ?
?php echo
Use elements, you can pass values between them:
$this-element('whatever', $valuetobepassed);
On 2 June, 13:16, Narendra Padala crazycake...@gmail.com wrote:
Hi flocks,
I am, new to cake php actually i want display one report, in the down i
put the link download link for Excel.
For that
I'm trying to avoid putting $uses at the top of my controller and
aiming to make do with model associations, but alas containable()
doesn't work when trying:
$this-Model1-Model2-find('threaded', array('contain') = 'Model3');
But:
$this-Model1-find('threaded', array('contain') =
1 - 100 of 105 matches
Mail list logo