Any ideas?
On 7 mar, 17:23, pablosky wrote:
> Yes, viewClass is declared before beforeFilter.
>
> public $ viewClass = 'Theme';
>
> The entire application uses themas correctly.
>
> Thank!
>
> On 7 mar, 15:38, Tilen Majerle wrote:
>
>
>
&
Yes, viewClass is declared before beforeFilter.
public $ viewClass = 'Theme';
The entire application uses themas correctly.
Thank!
On 7 mar, 15:38, Tilen Majerle wrote:
> maybe try to set viewClass = 'Theme';
> --
> Lep pozdrav, Tilen Majerlehttp://maj
Hello,
Version 2.0.5
To change the layout of the errors is easy:
// In beforeFilter
if ($this->name === 'CakeError') {
$this->layout = 'default';
}
But how I can do to use a layout of a theme?
I tried this but it works:
// In beforeFilter
if ($this->name === 'CakeError') {
$this->theme
zation Application Tutorial
>
> On 22 Feb., 21:23, pablosky wrote:
>
>
>
>
>
>
>
> > Hello,
>
> > I used CakePHP 1.3 and now I come to CakePHP 2.0.
>
> > Do not know how to do a simple authentication system.
>
> > I have this in AppController:
>
Hello,
I used CakePHP 1.3 and now I come to CakePHP 2.0.
Do not know how to do a simple authentication system.
I have this in AppController:
public $components = array('Cookie', 'RequestHandler', 'Session',
'Auth');
public function beforeFilter() {
$this->Auth->loginRedirect = array('cont
t; 1,
'Type.name' => 'Posts', 'Lang.alias' =>
Configure::read('Config.language'), $condition),
'contain' => array(
'Type' => array('fields' => array('Type.name')),
Hello,
I use CakePhp 2.0.5.
In my project I have the following relations:
Content (belongTo) > Type
Content (belongTo) > Lang
Content (HABTM) > Tag
Type (hasMany) > Content
Lang (hasMany) > Content
Tag (HABTM) > Content
For a listing of records for a blog I have the following code:
$posts = $t
In my case, the two relationships are belongTo. But in the example of
CakePHP documentation the first relationship is belongTo and the
second is hasMany.
http://book.cakephp.org/2.0/en/models/model-attributes.html#recursive
But I will try containable.
Thank you very much!
On 16 ene, 22:27, je
On 16 ene, 22:27, jeremyharris wrote:
> You said they are both belongsTo, but then you said the second relationship
> is hasMany.
>
> hasMany are pulled as a separate query, so calling it like this won't work.
> You can, however, use containable:
>
> $this->Comment->find('all', array(
> 'field
Hello,
I have 3 models:
Comment (belongTo)> Content (belongTo)> Type
I need to access from model to model Type Comment:
$this->Comment->find('all', array('recursive' => 2, 'fields' =>
array('Comment.id', 'Comment.active', 'Content.id', 'Content.slug',
'Type.slug', 'Comment.author', 'Comment.tit
Hello,
I have problems with file validation. I have several forms for
uploading files. The validation simply does not work. And all files
are loaded. For example, the simplest:
var $validate = array(
'archive' => array(
'extension' => array(
'rule'
Fixed. The problem was that the model is within a plugin.
$this->loadModel('Settings.Setting');
Thanks!!!
On 17 feb, 14:06, "Dr. Loboto" wrote:
> Does it really loads this model? Simplest check is by class name:
> pr(get_class($this->Setting));
>
Hello.
I have a controller that using another model . And save some data:
$this->loadModel('Setting');
$this->Setting->saveAll($settings['Settings']['Setting']);
The model is this:
class Setting extends SettingsAppModel {
var $name = 'Setting';
function afterSave()
{
Hello.
I'm trying to extract data from a table from the app_controller.php.
But the table is related to another table using "belongTo."
This code works:
if (!Cache::read('links')) {
$this->loadModel('Link');
$result = $this->Link->find('all', array('fields' =>
array('Link.id', 'Link.name', '
or
'allowEmpty' with an error message.
Thank you very much for your help.
On 17 dic, 11:38, John Andersen wrote:
> Try to rename your error labels, so they do not conflict with existing
> error labels!
>
> Change "between" to "username_between" a
gt; http://book.cakephp.org/view/133/Multiple-Rules-per-Field
>
> Example:
>
> print(
> $form->input(
> 'username',
> array(
> 'label' => __('user name',true),
> 'error' => array(
> 'users_username_
Thanks for answering.
I do this because I need to translate the messages of validation. I
found this method in the book and also cake "bakers":
http://book.cakephp.org/view/133/Multiple-Rules-per-Field (In the end)
http://bakery.cakephp.org/articles/view/multiple-rules-of-validation-per-field-in-
Hello.
I need to translate the error messages. I have this in my model:
var $validate = array(
'username' => array(
'between' => array(
'rule' => array('between', 4, 10),
'last' => true
),
'unique' => array(
'rule'
Sorry for my English.
I'm doing an access control system using Auth and Acl components.
In AppController:
$this->Auth->loginAction = array ('controller' => 'users', 'action' =>
'login');
$this->Auth->logoutRedirect = array ('controller' => 'users', 'action'
=> 'login');
$this->Auth->loginRedirect
19 matches
Mail list logo