Olá galera,
desenvolvi meu site usando o cake, integrei a meu layout, até aí blz.
Agora a dúvida, estou criando um blog para meu site, que utilizará um layout
totalmente diferente do padrão do site.
Como faço isto? É melhor pegar uma cópia da pasta /app, renomear para blog e
criar um novo
Você só precisa definir no método ou no controller qual o layout quer
utilizar...
Procure por...
setLayout()
$layout
Falopa!
Em 20/12/07, Bill [EMAIL PROTECTED] escreveu:
Olá galera,
desenvolvi meu site usando o cake, integrei a meu layout, até aí blz.
Agora a dúvida, estou criando um
ou criar um novo layout e no seu controller dizer $this-render(null,
'blog'); onde blog é o nome do arquivo do novo layout...
Em 20/12/07, John-Henrique Ferreira Silva [EMAIL PROTECTED] escreveu:
Você só precisa definir no método ou no controller qual o layout quer
utilizar...
Procure
Tentei de várias maneiras e não consegui...to apanhando d+ do cake hoje..rs
fiz o seguinte, criei um arquivo blog.ctp dentro da pasta /layout com um
layout simples, tipo b?php echo $content_for_layout; ?/b (apenas pra
teste)
criei o controller blogs_controller.php sem conteúdo, apenas pra
Bill,
Acho que é necessário setar o layout no controller, antes que o
index.ctpseja renderizado.
Veja um post do DJ Spark naquela thread entitulada *Layout ERA Re:
othAuth...*. Num dos últimos e-mails da thread o Spark estava me explicando
sobre o requestAction, e lá ele dizia para setar as
Hehehehe, Valeu benito!
O problema era a pecinha que se encontra entre a cadeira e o teclado (EU).
Valeu pelas dicas, lendo tua respsota consegui resolver aqui.
Mto obrigado amigo.
Grande abraço
Bill,
Acho que é necessário setar o layout no controller, antes que o
index.ctp seja
Bill,
Qual versão do Cake você está usando? Testei agora com o Cake 1.2.6178
(HEAD do SVN) e deu certo. Fiz o seguinte:
teste_controller.php
class TesteController extends AppController {
var $uses = array();
function plug() {
$this-layout = 'lala';
}
}
layouts/lala.ctp
pre
?php echo
Olá Juan,
agora deu certo, usei dentro da function do controller isto:
$this-layout = 'blog';
estou usando a 1.2 pre-beta do cake
Abraços
Bill,
Qual versão do Cake você está usando? Testei agora com o Cake
1.2.6178
(HEAD do SVN) e deu certo. Fiz o seguinte:
teste_controller.php
class
Bill,
Nos últimos dias a pecinha da minha cadeira (aquela que fica sobre a
cadeira) tem dado muitos problemas com Cake...
Abraço,
Benito
On 12/20/07, Bill [EMAIL PROTECTED] wrote:
Hehehehe, Valeu benito!
O problema era a pecinha que se encontra entre a cadeira e o teclado
(EU).
Valeu
Hey thanks for the reply!
And yes, my mistake :)
--
Nanda Gopal Sankaran
--~--~-~--~~~---~--~~
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
Thanks for your input. The overhead for each request could be a killer
if I start building a very fragmented ajax-heavy interface.
I have started testing a small prototype interface. The initial page
is loaded containing invisible templates for letting javascript add
new form data (there are
tc-mark-lap in the browser url, it worked.
To sum up, the host name in the url needs to match the host name you
use in your scripts. In other words, don't call use localhost in your
scripts, and don't call your ajax pages using localhost in your
browser. It may work on your dev machine,
To sum up, the host name in the url needs to match the host name you
use in your scripts. In other words, don't call use localhost in your
scripts, and don't call your ajax pages using localhost in your
browser. It may work on your dev machine, but won't on your
production server.
I
I wrote a component, that uses an XML-RPC library from PEAR.
On Dec 19, 7:57 pm, Juan Basso [EMAIL PROTECTED] wrote:
Hi,
Anyone have worked with xml-rpc? Not for server, but to a client. My
application need get data under xml-rpc of others machines...
Thanks.
Juan Basso
On Dec 19, 11:22 pm, Grant Cox [EMAIL PROTECTED] wrote:
You should be setting all required data in your controller. If you
have
$this-data = $this-User-read( null, $user_id );
in your controller, then your form will automatically populate.
Yes but how does Cake know which controller to
this is my users controller:
?php
class UsersController extends AppController {
var $name = 'Users';
var $helpers = array('Html', 'Form' );
var $helpers = array('othAuth');
var $components = array('othAuth');
var $othAuthRestrictions = array('index');
ok new thing didnt do anything, now it seems that oth_msg outputs
right when blank it says so, when wrong usrnm or pswd also, but when i
write the right username and password i get following errors:
Notice: Only variables should be assigned by reference in /localhost/
Hi Guys,
I've got a question, and hopefully one of the cakephp guys can give an
answer.
First, the scenario...
I often will used more than one model file to represent the same data.
A common reason is to separate admin functions from normal ones, so
the normal model is less intensive to load.
Hey Baz,
Have a look at one of my previous threads -
http://groups.google.com/group/cake-php/browse_thread/thread/9d3294c250fa5f2b/75bdd50d44924363?lnk=gstq=installation+in+subdirectory#75bdd50d44924363
- not sure if that exactly describes your scenario but it might help.
Regards,
Graham
ok, since i use cake 1.1.8 i changed two lines in oth_auth component
file on line 333,334 so i dont get the mysql error anymore.
but whats with the headers and that variable notice?...
On Dec 20, 11:22 am, pandako [EMAIL PROTECTED] wrote:
ok new thing didnt do anything, now it seems that
Hi Guys,
Does anyone know how one can do a direct query to the db without the
model having a table?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
SELECT `Foto`.`id`, `Foto`.`immobile_id`, `Foto`.`nome`,
`Foto`.`codice_riferimento`, `Foto`.`nome_file`, `Foto`.`nome_eng`,
`Foto`.`nome_file_miniatura`, `Foto`.`extra_path`,
`Foto`.`extra_path_miniatura`, `Foto`.`descrizione`,
`Foto`.`descrizione_eng`, `Foto`.`note`, `Foto`.`created`,
PS: i used this line to delete:
$this-Foto-del($id)
On 11 Dic, 17:30, AD7six [EMAIL PROTECTED] wrote:
On Dec 11, 5:12 pm, Paolo [EMAIL PROTECTED] wrote:
HI!
I'm trying to delete a row from a model, using
Modelname-del($id)
But I receive the error
SQL Error: 1052: Column 'id' in
Hi lordG,
I am no expert, but here is what I did on one occasion (without a
model):
$db = ConnectionManager::getInstance();
$conn = $db-getDataSource('default');
$conn-rawQuery($some_sql);
Hope that helps,
dr. H.
--~--~-~--~~~---~--~~
You received this message
Try using an absolute url instead of a relative one (just for kicks).
It might help track down the problem.
BTW, I HAVE noticed a lag on google groups when posting sometimes. I
don't think the group is moderated (as in, having each reply approved
by a moderator before being posted). Sometimes
On Dec 20, 12:03 pm, Paolo [EMAIL PROTECTED] wrote:
PS: i used this line to delete:
$this-Foto-del($id)
Are you sure that sql is coming directly from your delete call.
If you are using 1.2, have a look at the error stack trace, and see
from which call exactly. that sql comes from. Have you
On Dec 19, 3:49 pm, Baz [EMAIL PROTECTED] wrote:
Now, I've found tons of posts talking about this, but I haven't found any
that address my particular problem.
I will be satisfied with the answer that this cannot be done, at least then
I'll stop looking, but if someone has an idea, I would
On Dec 20, 11:54 am, lordG [EMAIL PROTECTED] wrote:
Hi Guys,
Does anyone know how one can do a direct query to the db without the
model having a table?
Thanks.
You could try just calling query anyway. unless you change the
connection config to use, it´ll still work. Or you could use any
Sorry, my fault! :D
I didn't check exactly, that came from Foto-find('id'='$id'), which
corrected into Foto-find('Foto.id'='$id') did the job.
thanks anyway!
Paolo
On 20 Dic, 13:10, AD7six [EMAIL PROTECTED] wrote:
On Dec 20, 12:03 pm, Paolo [EMAIL PROTECTED] wrote:
PS: i used this line to
dr. Hannibal Lecter wrote:
Hi lordG,
I am no expert, but here is what I did on one occasion (without a
model):
$db = ConnectionManager::getInstance();
$conn = $db-getDataSource('default');
$conn-rawQuery($some_sql);
Hope that helps,
dr. H.
Thanks Lector, this worked 100%!
On 20 Gru, 13:04, hydra12 [EMAIL PROTECTED] wrote:
Try using an absolute url instead of a relative one (just for kicks).
It might help track down the problem.
BTW, I HAVE noticed a lag on google groups when posting sometimes. I
don't think the group is moderated (as in, having each reply
$name? are you refer to the other post. If so, I've posted another
message there.
AD7six wrote:
On Dec 20, 11:54 am, lordG [EMAIL PROTECTED] wrote:
Hi Guys,
Does anyone know how one can do a direct query to the db without the
model having a table?
Thanks.
You could try just
Ok, it seems the problem with the model names and the form element
names is not as I previously experienced in 1.1, my guess is that I
was probably doing something wrong. hahahaha!
Anyway, my questions still remain with regards to the naming
conventions. :D
No problem, glad I could help someone!
Cheers!
--~--~-~--~~~---~--~~
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
On Dec 20, 10:37 am, lordG [EMAIL PROTECTED] wrote:
Hi Guys,
I've got a question, and hopefully one of the cakephp guys can give an
answer.
First, the scenario...
I often will used more than one model file to represent the same data.
A common reason is to separate admin functions from
On Dec 20, 1:34 pm, lordG [EMAIL PROTECTED] wrote:
$name? are you refer to the other post. If so, I've posted another
message there.
The subject for this thread
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
this checklist should be on the cake manual :)
On Dec 19, 2007 2:24 PM, Samuel DeVore [EMAIL PROTECTED] wrote:
Here's the common response
1. is mod_rewrite enabled on the server
2. are you sure
3. is AllowOverride All set on the server
4. are all the .htaccess files in place (a lot of ftp
OK,
This is my desired setup:
- account
public_html
- cake1.2 (has dump of cake files)
- app1
- app2
- app3
The web root for my domain is public_html and I cannot change it. So in
public_html the only thing I can do is have a .htaccess file to
I agree with DJ Spark... maybe it should be on the welcome message
when people subscribe to the cakephp google group as well (if there is
a welcome message - been so long I can't remember)?
Adam
On Dec 20, 11:16 pm, DJ Spark [EMAIL PROTECTED] wrote:
this checklist should be on the cake manual
Sorry, my htaccess file is going to: public_html/cake1.2/app1/webroot
- account
public_html
- cake1.2 (has dump of cake files)
- app1
- webroot
- app2
- webroot
- app3
- webroot
On Dec 20, 2007 7:26
I've also run into a few conflicts when naming models and helpers...
eg. i had a model image and an imagehelper, when baking the view
page it generate $this-set('image', $image); which would obviously
conflict with my helper. I ended up naming my helper MagicImage
instead :) However it would be
I'd like helper instances to be capitalized in the view, to avoid this
- i.e. $Html-image(...) instead of $html-image(...)
The reason is the same as Adam's; models and helpers can often be
named the same, and this causes problems.
I've thought about the helper alias thing, I agree it would be
Hi!!
I am searching and reading enough things on the users' access and
permissions (OthAuth, ACL ...). The question is that I want to do the
access to my application depending on the type of user. I have 3 types
of users:manager, client, supplier and in the database 3 tables with
their different
On Dec 20, 2007 8:55 AM, dandreta [EMAIL PROTECTED] wrote:
Hi!!
I am searching and reading enough things on the users' access and
permissions (OthAuth, ACL ...). The question is that I want to do the
access to my application depending on the type of user. I have 3 types
of users:manager,
Hi all,
does anyone else have a problem with bakery rating system? I've used
some code from several articles and I'd like to give those guys kudos,
but I just cant, I click on the rate link and the whole bakery deforms
(obviously due to an AJAX request).
Before you ask, yes, I _am_ logged in
Adam, I think your idea of the alias naming is good. It would help
considerably.
Adam Royle wrote:
var $uses = array('Image' = 'ImageModel');
var $helpers = array('Image' = 'ImageHelper');
or
var $uses = array('Image' = array('alias' = 'ImageModel'));
var $helpers = array('Image' =
AD7six, thanks for your feedback. below are some further thoughts.
The above sounds rather over complex to me. What is the benefit of
making several 'models' for one model? (The fact that I ask should
imply that I don't percieve any of the above reasons as a benefit).
Here is another example
Thanks, I appreciate the suggestions.
Along the way I found a simple naming issue that was screwing up my
fixtures: I had named my file tournament_games_test_fixture.php
instead of the singular, tournament_game_test_fixture.php.
I also am finding that if I try to load the ...Test model in the
Ah, right... well if I load the class Model and create an object
called Model to work with, then it would naturally complain that the
table was missing... in 1.1.x this worked 100% for me, but in 1.2 not.
AD7six wrote:
On Dec 20, 1:34 pm, lordG [EMAIL PROTECTED] wrote:
$name? are you refer to
Me too.
On Dec 20, 10:13 am, dr. Hannibal Lecter [EMAIL PROTECTED]
wrote:
Hi all,
does anyone else have a problem with bakery rating system? I've used
some code from several articles and I'd like to give those guys kudos,
but I just cant, I click on the rate link and the whole bakery
array_merge doesn't work for me. The passed array could be of any
depth, so I need to do it recursively.
I have done this:
function transform($input, $key_data = array()) {
foreach ($input AS $key = $value) {
if(is_array($value)) {
$key_data[] = $key;
You can send to me? Or post here? My e-mail is jrbasso under
gmail.com.
Thanks.
Juan Basso
Serge Rodovnichenko escreveu:
I wrote a component, that uses an XML-RPC library from PEAR.
On Dec 19, 7:57 pm, Juan Basso [EMAIL PROTECTED] wrote:
Hi,
Anyone have worked with xml-rpc? Not for
Check your web server configuration file.
On Dec 19, 10:09 pm, effour [EMAIL PROTECTED] wrote:
Hi,
I had a developer create a site for me a year or so ago.
I cannot figure out how to add a simple page to the root of the site.
Everything seems to be redirected and there are views and
In case someone needs this here is the solution:
no cake used:
/*
* Usage $data (array to be transformed), $result = null- to hold the
result
* transform($data, $result);
*/
function transform($input, $output, $key_path = array()) {
foreach ($input as $key = $value) {
That's because setUp should not be used with test cases that descend from
CakeTestCase (i.e: test cases with fixtures) or you are going to get those
nasty side effects. Instead use their equivalents:
startCase(): called ONCE during the execution of ALL test methods, and right
before the first
by default cake findAll functions return an array in format:
row = array(
Table1 = array(field1=value1, field2=value2...),
Table2 = array(field1=value1, field2=value2),
..
)
I need an array in the following format
row = array(
Table1.field1=value1,
I'm not sure of the actual code (writing from my memory), but I think
it could be accomplished with something like:
class BlankModel extends AppModel
{
var $useTable = false;
}
Which ought to give you a table-less model.
(I might be wrong though:-))
Hello all, a new cakephp user and still finding my way around.
I have a User model with associated UserPhoto model (foreign key is
user_id). I am able to pull the data fine, however I wanted to use
the paginator functionality with the data to list the user, last
update date, and a count of the
Thanks for the replies. I finally figured out that it was Firecake
itself which was screwing with the session.
Removing the firecake reference from the view fixed my problem.
On Dec 14, 9:45 pm, jarmstrong [EMAIL PROTECTED] wrote:
What security level do you have your cakeapp running at? Many
Thank You Grant, I will try that.
On Dec 20, 12:19 am, Grant Cox [EMAIL PROTECTED] wrote:
This post is also in reply to your email...
Set your error_reporting in php.ini to E_ALL ~E_STRICT - you don't
want to see strict errors everywhere (CakePHP is not PHP5 strict
compatible, as it has to
Hello,
I've been having a very similar problem in 1.2.5875. I followed the
above tips, using them to modify the instructions in the Bakery
article. It looks like the fixture tables are being created, but that
I am unable to access any data from them. For example:
My user_test_fixture.php:
I'm having a relatively simple problem (at least I hope). I'm hoping
I'm simply not understanding the framework properly, but perhaps
someone can help me solve my confusion.
The problem I'm having is related to saving data to multiple models in
one save. Perhaps this idea is voodoo, but in the
This fix (possibly in combination with several of the others
mentioned, since I tried most of them) worked for me. Thanks so much
for sharing!
Sarah
On Dec 18, 7:56 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi, I recently had this blank page problem.. The problem was coming
from the file
I'm guessing for the static media its not actually making a request as
the browser probably cached it.
If you were to clear your cache you would see the same problem with
your static media. At least you should see the problem for the first
request, but then the problem would magically fix itself.
As far as I know, save (opposite to read is for a single
model) ..seems you have to implement multiple save
On Dec 20, 9:57 pm, Cake Fan [EMAIL PROTECTED] wrote:
I'm having a relatively simple problem (at least I hope). I'm hoping
I'm simply not understanding the framework properly, but
On the contrary, cake WAS broken, not Regan's code. Otherwise, the
issue wouldn't have been considered a bug, and it wouldn't have been
fixed in a later release.
You should have quit while you were behind with your wise mouth.
In the end, it *was* your code that was broken: you can't
mhm sorry but you're aware of the fat models , thin controllers
idea ?
imo let's stick to it. in you example you should have a controller
with admin_actions
and using the same model.
If many of the structures are the same then just put them in the same
model and call them from admin/user
I dont know if this helps, but for me works:
--
In the controller:
--
...
var $uses = array('Benchlink', 'Country', 'Report', 'Lookup',
'Rank', 'Piece',
On Dec 20, 2007 4:50 PM, hmpierson [EMAIL PROTECTED] wrote:
You should have quit while you were behind with your wise mouth.
Very helpful. Thanks!
--
Chris Hartjes
My motto for 2007: Just build it, damnit!
@TheKeyboard - http://www.littlehart.net/atthekeyboard
Hi,
i just want to know ,
how can we create datagrind in cakephp using ajax helper
I have post this topic before this also
but I didn't find any solution
please help me, if anyone finds the solution
--~--~-~--~~~---~--~~
You received this message because you are
Vlad, is this what you're doing?
http://bakery.cakephp.org/articles/view/diy-international-i18n-urls-in-cake-1-1-x-or-lower
I'm debating how best to handle moving an existing dual-language site
to cake. I'd also like to have the URLs translated and this seems like
a decent approach. Though i'm
thanks baz that worked great =)
On Dec 19, 7:52 pm, Fabian [EMAIL PROTECTED] wrote:
$conditions = array(`date_added` . ' . $startDate . ',
`date_added` . ' . $endDate . ');
On Dec 17, 3:30 pm, Baz [EMAIL PROTECTED] wrote:
Make sure debug is on and check the Query that is being
Thanks Grant , never thought it would be that easy, yeah the table
names are plural but that's also good to know and might help someone
else =)
On Dec 19, 11:07 pm, Grant Cox [EMAIL PROTECTED] wrote:
In your Event model, have
var $primaryKey = 'event_id';
Now you weren't clear about the
73 matches
Mail list logo