Excuse me for double posting but there is a typo in the preceding message
This is tested and work :)

<?php
class ContentsController extends AppController {
  var $name = "Contents";
  var $scaffold;

  function beforeRender() {
    // hides some fields for index action
    if($this->action == 'index') {
      unset($this->viewVars['fieldNames']['field01']);
      unset($this->viewVars['fieldNames']['field02']);
      unset($this->viewVars['fieldNames']['field03']);
    }
    return true;
  }
  
}
?> 

-----Messaggio originale-----
Da: [email protected] [mailto:[EMAIL PROTECTED] Per conto
di Petry
Inviato: martedì 6 febbraio 2007 18.45
A: Cake PHP
Oggetto: Custom Scaffold view


Hi all

I have a table with 5 fields, and I temporary use scaffold for  list, edit
and delete functions. But in list view, all field are visible.
Why i set some items to invisible, only on list view?




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to