I assume that you have both models available in your controllers view
action, so amend your code as:
[code]
$this-set('photos', $this-paginate(Photo, array('Photo.gallery_id'
= $id)));
[/code]
That should give you the photos from the chosen gallery.
If the above is not your issue, please
Hi Changoso.
You only need:
Models:
Define relation between master and detail model.
Mastermodel controller:
function view();
$this-Mastermodel-recursive = 1;
$this-set('mastermodel', $this-paginate(Mastermodel));
mastermodel view:
foreach ($mastermodels as $mastermodel):
---Display
Forget it.
I have a mistake in my code.
Sorry.
On 31 ene, 13:11, Pau pdomingu...@gmail.com wrote:
Hi.
I have created a database view and then bake it into a cake model.
I have:
MydbView Controller call:
$this-set('mydbview', $this-paginate('Mydbview'));
MydbView index view:
echo
Hey guys and gals,
I'm posting on behalf of a business friend of mine, who operates a
local web design and development business in Newcastle, NSW,
Australia.
He's currently looking for a full time, in-house, permanent web
developer thats got some CakePHP experience.
if anyone is interested,
Hello.
i need a select box, wrapped in his div class='input select' div
and with blank first entry
$form-input() --- the select didn't have the empty field
$form-select() --- the select wasn't wrapped in his DIV
any suggestion?
ps: i'm using Cake 1.3Beta
Check out the new CakePHP Questions
Euromark, I think that __construct is the first thing that runs in Any
class, so sessions are avaliable in all methods.
I thought of using it at bootstrap, but there the session is
unavailable...
On 31 jan, 20:29, euromark dereurom...@googlemail.com wrote:
this will never work
the session is
try:
$form-input('**fieldname**', array('empty' = true));
...where **fieldname** is the field you want to display. This will give you a
populated drop down but the first entry will be an empty row. Is this what you
wanted?
Jeremy Burns
jeremybu...@me.com
(Skype) +44 208 123 3822
On Jan 31, 11:32 am, Lorenzo Bettini bett...@dsi.unifi.it wrote:
Hi
in my AppController I've enabled cache for view and index actions and
they work fine.
Now, I'd like to disable cache when a user is logged, since in that case
additional information are shown that must not be cached.
On Feb 1, 10:56 am, AD7six andydawso...@gmail.com wrote:
On Jan 31, 11:32 am, Lorenzo Bettini bett...@dsi.unifi.it wrote:
Hi
in my AppController I've enabled cache for view and index actions and
they work fine.
Now, I'd like to disable cache when a user is logged, since in that
Hi, I need to set up 'member' prefix for my page with its
localization.
So my address is now ... example.com/member/index
BUT, how can I translate the word member to other language? Let say I
wish to use a spanish word 'miembro' in URL but english word 'member'
as action prefix in the
hi, I had this kind of problem before this due to Selinux context, you
must follow the instruction in the selinux notification or launch it
if it's not luanched automatically.
make right click on your cake directory you find in permission that
selinux context is user_data (if i remember), change
yes thanks.
On 1 Feb, 10:46, Jeremy Burns jeremybu...@me.com wrote:
try:
$form-input('**fieldname**', array('empty' = true));
...where **fieldname** is the field you want to display. This will give you a
populated drop down but the first entry will be an empty row. Is this what
you
I want to add my thanks to everyone contributing.
@Mark
Did you forget to make this topic a sticky? On the first page in the
google group the 1.2.5 announcement is still pinned at the top but
this one is not.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their
the real problem is that beforeRender is not called if the page is
present in the cache... any idea of where to put such control?
thanks in advance
Lorenzo
djogo wrote:
Euromark, I think that __construct is the first thing that runs in Any
class, so sessions are avaliable in all
Could you use cake:nocache/cake:nocache in the right places? See
http://book.cakephp.org/view/347/Marking-Non-Cached-Content-in-Views
Jeremy Burns
On 1 Feb 2010, at 12:36, Lorenzo Bettini wrote:
the real problem is that beforeRender is not called if the page is present in
the cache... any
On Feb 1, 1:36 pm, Lorenzo Bettini bett...@dsi.unifi.it wrote:
the real problem is that beforeRender is not called if the page is
present in the cache... any idea of where to put such control?
How is that different than your initial question.
Why not change the cached view folder (in the
I tried to put this in bootstrap.php
session_start();
debug($_SESSION);
and I get an empty array, so this does not work...
isn't really no way to get control before the cache read is performed?
Lorenzo
djogo wrote:
Euromark, I think that __construct is the first thing that runs in Any
On Feb 1, 2:00 pm, Lorenzo Bettini bett...@dsi.unifi.it wrote:
I tried to put this in bootstrap.php
session_start();
debug($_SESSION);
print_r($_COOKIE); die;
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received
I am using cakephp 1.2 on my mac. i cannot get $this-Cookie-write
to actually write a cookie. i am guessing this has something to do
with my localhost development environment, but I can't find any
information on this issue. can someone help?
Check out the new CakePHP Questions site
i installed the cakephp in localhost, it is connected succesfully.
Similarly i have gone to install the cakephp in phpwebmagic server.
but i have the problem called Cake is NOT able to connect to the
database. eccept that everything is running smoothly... Let me know
the solution from experts.
Hi Hayden,
I'm just learning Cake myself, and I had exactly the same problem with
MAMP.
Have a look here:
http://marshallthompson.net/uncategorized/mamp-socket-error-no-such-file-fix
The second (permanent) fix doesn't work for me, but the first one
does. With MAMP running, fire up your
Hi All,
I am trying to get all the errors in a variable. The problem is that I
can get missing controller and missing method or error404 like errors.
But I want to get warnings and notice errors in variable. How to do
this. I am just trying to make site error free. So that if someone is
using
AD7six wrote:
On Feb 1, 2:00 pm, Lorenzo Bettini bett...@dsi.unifi.it wrote:
I tried to put this in bootstrap.php
session_start();
debug($_SESSION);
print_r($_COOKIE); die;
Array ( [CAKEPHP] = ... [PHPSESSID] = ... )
that's all, no other useful information...
--
Lorenzo Bettini, PhD in
Jeremy Burns wrote:
Could you use cake:nocache/cake:nocache in the right places?
See http://book.cakephp.org/view/347/Marking-Non-Cached-Content-in-Views
I already do this for some parts of the layout (e.g., showing the
currently logged user), but I need it for the whole contents, and, as
I don't know of something off hand - but warnings and errors should be
cleared before going into production. Also when going into production
you should set your /app/config/core.php file's debug value to 0.
Just look for the line that says Configure::write('debug',2); and
change the 2 to 0
Best
Thanks to Miles for setting me straight on the constant requirement.
I've followed this lead as far as I can take it and here is what I
think I've learned.
1. In the context of database.php it is not possible to define
constants from the $_SERVER superglobal for non-standard elements,
namely,
Can I work from Malaysia? I'm @ gmt +8
Azril Nazli
http://protonmania.com
On Feb 1, 5:18 pm, Graham Weldon gra...@grahamweldon.com wrote:
Hey guys and gals,
I'm posting on behalf of a business friend of mine, who operates a
local web design and development business in Newcastle, NSW,
I've wrote a very simple plugin @ http://jobber.my/imz
On Jan 31, 9:04 am, cronet cro...@gmx.de wrote:
Hello,
i want to create a plugin, which covers a little admin section, e.g.
Usermanagement,Basic Authentication and website Settings
The idea is to have a admin section which is easy
Hi
is this a correct way of checking whether a table exists?
function check_table_exists($table) {
$dbo = $this-getDataSource();
$result = $dbo-_execute('DESCRIBE '.$table);
return !empty($result);
}
thanks in advance
Thank you!
The Gallery info shows fine, the associated photos also are shown, the
thing is:
I want to paginate So I only show 5 associated pictures per page, I am
guessing this has to do with Ajax pagination?! I dont know...
On Feb 1, 2:45 am, John Andersen j.andersen...@gmail.com wrote:
I
You can try this, then see if your table exists within the array.
http://www.milesj.me/blog/read/75/Retrieving-Tables-Within-Your-Cake-Database
On Feb 1, 8:27 am, Lorenzo Bettini bett...@dsi.unifi.it wrote:
Hi
is this a correct way of checking whether a table exists?
function
The problem I have with my solution, but I guess it's the same of the
one of the link, is that if I use it inside a controller, I get an error
before even reaching that code, due to a missing table... is there a way
to avoid this?
Of course I need this check for an installation page, which
Solved. The problem was indeed the missing exit();
Again, thank you very much Dave. You were a great help! :-)
On Jan 29, 5:03 pm, Dave make.cake.b...@gmail.com wrote:
This is my controller function
function manage_edit($id = null)
{
if ($this-RequestHandler-isAjax()) {
Just wondering how to go about setting up Products with the tree behaviour.
I have all my products added, categories / sub categories and so on. So how
would I get a URL to be site/products/shoes/mens/nike/27 based on the tree?
Rather than products/27
Just looking for some good insight,
Ok, then I understand your issue. Have you followed the steps from the
CakePHP manual, starting at:
http://book.cakephp.org/view/164/Pagination
and thus your controller is setup to handle pagination and your view
shows the paginator controls?
Please show the paginate code from your controller
How to use CMS in cake php.
I want to whole site content control in cake php admin panel.
Can you help me?
--
Regards
Md.Moniruzzaman
Web Developer
Contact no:+088-01712027826
United Group International
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their
Hello Graham,
I am interested in doing such projects. I am from India.
Thanks Regards
Vishwesh Kumar Yadav
On Mon, Feb 1, 2010 at 2:48 PM, Graham Weldon gra...@grahamweldon.comwrote:
Hey guys and gals,
I'm posting on behalf of a business friend of mine, who operates a
local web design
Hello, I'm relatively new to CakePHP but have read the manual through
several times and am familiar with the concepts. I have a legacy
database that has a table in it that I don't know how to handle in
Cake so that Bake will bake everything correctly. There's a table
called Categories that has
Controllers expect to have a model which in turn expects to have a table
in the DB by default. If you have a controller that doesn't use a model
set $uses to 'null' or an empty array... if you have a model that
doesn't have a datasource then look at $useTable and $schema variables
in
hi Dave,
Just wondering how to go about setting up Products with the tree behaviour.
I have all my products added, categories / sub categories and so on. So how
would I get a URL to be site/products/shoes/mens/nike/27 based on the tree?
Rather than products/27
Just looking for some good
Hi Dave,
If you're on the 'bleedin edge' and working with cake 1.3, then the
new custom router class functionality may well be handy.
http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp
hth
Jon
--
jon bennett - www.jben.net - blog.jben.net
Check out the new CakePHP
Yes like Nabil said, most models should be related to a table. If you
are trying to figure out if a table exists, then you shouldn't have a
model.
Can you explain your situation a bit more?
On Feb 1, 11:16 am, Nabil Alsharif bli...@gmail.com wrote:
Controllers expect to have a model which in
count me in if you change your mind and accept remote work or project
based (it would be same or better quality and more cost effective).
On Feb 1, 8:32 pm, vishwesh yadav vishwesh1...@gmail.com wrote:
Hello Graham,
I am interested in doing such projects. I am from India.
Thanks Regards
I think that needs the writebuffer()...
On 30 jan, 15:27, LordZardeck s...@blackfireweb.com wrote:
For some reason I can't get this line of code to work:
$js-get('click1')-event(click, $js-alert(You clicked me!));
Nothing is returned. I've echoed inside the get function and inside
the event
Greetings,
I am building a web application which uses a simple auth login system
which was inspired from the cake manual. Nothing fancy.
Everything was fine on localhost, but when I uploaded to a linux
server, the user gets logger in and out randomly by just browsing
through the application.
I
Hi.
Im sending a form by ajax to /admin/authors/add the problem is that it tries
to execute for 30 seconds and next give up with an error. The problem is
obviusly this line of code:
$this-redirect(array('controller' = 'authors','action'='index'));
on the add method.
If i change it with:
Check
Hi.
Im sending a form by ajax to /admin/authors/add , the problem is that it
tries to execute for 30 seconds and next give up with an error. The problem
is obviusly is with this line of code:
$this-redirect(array('controller' = 'authors','action'='index'));
on the admin_add method.
If i change
Hi,
I'm not very experienced with PHP and I've been told this is a good
place to ask for help.
I have dyanamic dropdowns in a form taken from a DB. Meaning the first
dropdowns is populated by items in the DB and once selected it reloads
the page with javascript and populates the second dropdown
I would like to build a navigation system where the admin can modify menus
dynamically. I need a top , left, right, footer navigation. So i made my
navigation controller/model with tree behaviour. So those 4 menus are in
there, add sections within them. But cant seem to come up with the best way
hmm, maybe try adding the admin url parameter for this-redirect
On Feb 1, 10:19 pm, Manolet Gmail mano...@gmail.com wrote:
Hi.
Im sending a form by ajax to /admin/authors/add , the problem is that it
tries to execute for 30 seconds and next give up with an error. The problem
is obviusly is
$this-redirect(array('controller' = 'authors','action'='index', 'admin'
= true));
stilll broken... i think is a cake bug...
On Mon, Feb 1, 2010 at 4:30 PM, ecommy.com bstdevelopm...@gmail.com wrote:
hmm, maybe try adding the admin url parameter for this-redirect
On Feb 1, 10:19 pm, Manolet
You can't redirect from within an AJAX call.
On Feb 1, 1:36 pm, Manolet Gmail mano...@gmail.com wrote:
$this-redirect(array('controller' = 'authors','action'='index', 'admin'
= true));
stilll broken... i think is a cake bug...
On Mon, Feb 1, 2010 at 4:30 PM, ecommy.com
Hey guys,
The work cannot be remote, freelance, or outsourced.
This is for a full time position, and as I understand, is open to
Australian and New Zealand residents only.
Cheers.
Graham
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related
Hi,
I'm attempting to install cake on my server using the advanced
installation instructions. When I do a normal install everything
appears to work correctly. However, when I attempt to move the cake
folder all I get is a blank screen.
Here is the configuration I am trying to achieve:
Cake
I use this setup for all my apps.
I have the CakePHP core at one of the following locations, depending on the
version I am using for the app:
/Users/predominant/Projects/cakephp/1.1
/Users/predominant/Projects/cakephp/1.2
/Users/predominant/Projects/cakephp/1.3
Each app is in
Why dont you just use absolute paths for all the constants? Theres no
point in using dirname() over and over again.
Secondly, have you printed our your $_SERVER['DOCUMENT_ROOT] to see
if its the correct path?
On Feb 1, 2:15 pm, Raydon raydo...@ymail.com wrote:
Hi,
I'm attempting to install
I’m using a DISTINCT in a find('list') because I need to do an inner
join, but the key don’t show up in the result.
My query is:
$sources = $this-find('list', array(
'fields' = array('DISTINCT Source.id', 'Source.name'),
'conditions' = array('agglomeration_id' = $agglomeration),
Keep in mind that Cake stores CRUD methods in the aros_acos table, so
when doing an ACL check from the console use this:
cake acl check Group.2 Users update
Which should return: Array is allowed.
Same goes for the following:
add = create
view = read
edit = update
delete = delete
Did you find
Hi,
Im struggling a bit with how to do, and where to put, this little
issue. I expect its obvious and been solved before; but i can't find
it.
I have a forum categories model, and on the index page iv'e got the
usual table of categories, paginated.
My controler looks like this:
function
On Mon, Feb 1, 2010 at 9:26 AM, karthik mca karthik...@gmail.com wrote:
i installed the cakephp in localhost, it is connected succesfully.
Similarly i have gone to install the cakephp in phpwebmagic server.
but i have the problem called Cake is NOT able to connect to the
database. eccept that
On Mon, Feb 1, 2010 at 3:43 PM, joe-electro joe.elec...@gmail.com wrote:
(..) How do I tell
Cake that this field points to the primary key of this table and not
of a table called Parent_Categories?
http://book.cakephp.org/view/851/Multiple-relations-to-the-same-model
Best regards.
--
I have a permission system with 3 tables:
- Users
- Locals (access locals table)
- Permissions (table N:M)
I want to check permissions in actions of the controllers, then I need
create a Component and to call in app_controller.php
How I do to use Permission table on component to check
Hi Andrade I have installed cakephp in server, Because of
databasename(my DB name: education) i not able to connect. I found the
solution that to add the prefix(phpwebm_education). Now its installed
Thanks for reply...
On Tue, Feb 2, 2010 at 7:19 AM, Marcelo Andrade mfandr...@gmail.com
Hi
I'm trying to build an installation procedure for my site based on
cakephp; thus I have an updates table where information concerning
version updates are stored. However, I need to bootstrap this procedure
so the first thing the installation script does is to check whether the
database
64 matches
Mail list logo