Questions tagged with view

2 answers

3 votes

Asked by JakubLedl, on 14/11/09 in

Query table in views

Hi. I'm learning CakePHP (using the blog app tutorial) and I want to get rid of that stupid table of SQL queries that shows in my views. So far I only found out that the table isn't passed in $content_for_layout variable, because it appends after...

3 answers

0 votes

Asked by JakubLedl, on 14/11/09 in

Fieldset

I'm successfully proceeding in process of learning Cake, and now I wonder:

I have this code:


echo $form->create(false, array('url' => '/search/'));
echo $form->input('term', array('class' => 'searchBox', 'label' => false, 'div' => false));
echo...

2 answers

0 votes

Asked by MissYeh, on 1/12/09 in

Display form field specific validation errorsspecific

I can get the form validation errors to work with a form that validates against 1 model.

But now I have a mixed form and validate against multiple models.

The field specific errors don't show anymore, but luckily I can catch the field erros using...

1 answer

0 votes

Asked by JakubLedl, on 5/12/09 in

Validation summary

Hi guys,

I know that if I use $form-input(), the validation errors will be shown automatically. This is really neato, but at this moment, I need a different behavior. I want those validation errors shown like a validation summary on top of the...

1 answer

1 vote

Asked by Darren, on 11/12/09 in

Store View Cache in APC or Memcached

I'm pretty familiar with caching in Cake. I regularly cache queries in the model (I stuff them into RAM via APC) and I also cache views. However, no matter how I setup my cache engines (they're all using APC) the views are always cached to...

1 answer

0 votes

Asked by DmitriySpb, on 15/12/09 in

Passing vars to view

For a long time I used this method of passing variable to view:


public function index(){
    $this->set('items', $this->paginate());
    $this->set('promos', $this->Promo->getRandomPromos(5));
}

OR


public function index(){
    $items =...

2 answers

1 vote

Asked by otisjs01, on 20/12/09 in

How do I pass a variable between views?

Hello,

I am relatively new to CakePHP and I am running into a problem that I think is pretty simple, but I just can't seem to figure it out. I feel like the answer has something to do with parameters, but I'm just stumped on how to implement it!

I...

1 answer

0 votes

Asked by kani, on 22/12/09 in

date options

views/index.ctp


<?php echo $form->input('neesen_ognoo', array( 'label' => 'Label' 
                                    , 'dateFormat' => 'DMY' 
                                    , 'minYear' => date('Y') - 2 
                                   ...

2 answers

0 votes

Asked by dhanya, on 22/12/09 in

How to get rid of Uninitialized string offset: 0 in cakephp

hi all

I get a "Uninitialized string offset: 0 "in my view page .

This error is shown in the related views tables.

How to get rid of this error. please help

thanking you....

1 answer

0 votes

Asked by kani, on 25/12/09 in

hide/show links for different types of user group

i want to show different links for each logged in user any way.


link1          \
                \
link2 \          \
       \          \
link3   * manager  \
       /            * admin
link4 /            /
                  /
link5 \         ...

1 answer

1 vote

Asked by otisjs01, on 28/12/09 in

How to auto-populate dependent habtm select boxes using ajax...

I am new to CakePHP, and I am guessing that this has been answered before, but I have a question about auto-populating dependent select boxes.

I've been googling and looking for nearly a week, and I just can't seem to figure this out! I've come...

2 answers

0 votes

Asked by sebb86, on 29/12/09 in

show database field from an other (related) model/controller in a view

Hello,

i'm very new in CakePHP.

I have two models each with a controller and some views. These models are related to each other in the MySQL database.

Now i readout the complete database table a in view a.ctp from controller members.php.

And i...

1 answer

0 votes

Asked by otisjs01, on 29/12/09 in

How do I pass named parameters?

Hello, I am new to CakePHP and trying to learn! Sorry if my question seems simple to answer, but I'm really having a hard time figuring out how to do this!

I have an application that tracks a contract between an appraiser and a client from start...

1 answer

0 votes

Asked by zoghal, on 31/12/09 in

When I use Media View ,my session deleted

i use my custom auth system in my project and it save user informatin into session(no used Auth Component)


$this->Session->write( 'Cms.User', array (...) );

when is use This Code


function profile_donwload( $paperID )
{
  if ( $file =...

2 answers

0 votes

Asked by davidwu, on 5/1/10 in

What's the best way to include Javascript into views?

I'll admit that of the M-V-C pattern's component parts, the View part is my weakest link. Even with elements, helpers and the like, my code ends up being large blobs of hard to read pieces of flotsam and jetsam. One major culprit is...

0 answers

0 votes

Asked by FlyingTux, on 5/1/10 in

Extended access privilegues - how to

Hello all,

I'm currently about to create a new website for an internet community whose current web is just like a mish-mash of like about 5-10 years old ugly Microsoft aspx scripts. However, we use to have around 40 different staff positions as...

1 answer

0 votes

Asked by dhanya, on 6/1/10 in

how to get name instead of id in related views?

hi all

I have users table it stores names, attendances table - contains date,and a has and belongs to many relationship attendances_users table- it contains user id and attendance id. When I take the related related views of attendance I need to...

2 answers

0 votes

Asked by dhanya, on 6/1/10 in

how to retain the tick mark in checkboxes while editing?

hi all

When I try to edit the fields given in check box (HABTM table ) the check boxes which I checked during add is been unchecked.

The code used in add as well as edit is same and is as follows

echo...

2 answers

0 votes

Asked by memons, on 7/1/10 in

dispaly xml file

Hello Cake Experts,

I want to display xml file in broswer: for example: http://www.mysite.com/myfile.xml

I know there is code snippet on net:

App::import('Xml');

$file = "filename.xml";

$parsed_xml =& new XML($file);

$parsed_xml =...

1 answer

0 votes

Asked by slippy, on 10/1/10 in

How to preselect select boxes

hi,

I need to preselect select boxes with items already chosen by the user

I do a find list in the controller and then set the data.

what I have already :

view


echo $form->input('locations', array( 'type' => 'select', 'multiple' => true));
...

<< previous 1   2   3   4   5   6   7