making a layout with CSS in CakePHP

2010-07-02 Thread Tomfox Wiranata
hi,

before i used cakephp i designed a layout with CSS naked (no
framework, no CMS) to show a members profile. now, i am asking myself
how to make this work in cakephp.

this is what i got worked so far:

i put all my divs containers into a view template:
div class=frame
div class=rightcolumn
div class=databox
div class=titleAllgemeines/div
form action= method=post name=profile 
id=profile
div class=row
span class=labelVorname/span
span class=profiledata?php echo 
$row['firstname'];?/span
/div

div class=row
span class=labelNachname/span
span class=profiledata?php echo 
$row['name'];?/span
/div

div class=row
span class=labelNickname/span
span class=profiledata?php echo 
$row['nickname'];?/span
/div

div class=row
span class=labelMitglied seit/span
span class=profiledata?php echo 
$row['date_created'];?/
span
/div
/form
/div

form action=profile.php method=post name=gotoEdit
id=gotoEdit
div class=buttoninput name=editProfile 
type=submit
id=editProfile value=Ändern //div
/form

/div

/div
/div

now, where do i put my css file (where all the divs are defined)? is
there a special folder for that? and where do i inlcude this file in
my code to tell cake to use this specific css file?

do i retrieve the user information for his profile in my controller?
probably with the find method?
do i put the code to print/show the information in my model?

right now i am using a loop to show the data:
div class=row
span class=labelMitglied seit/span
span class=profiledata?php echo 
$row['date_created'];?/
span
/div

but that wont work with cake

so technically i dont know how to tell cake to use my css file, where
(model or controller) to get the data from the table, and how/where to
show the data (model or controller) that it appears in my divs

any help would be great. thx s much

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: making a layout with CSS in CakePHP

2010-07-02 Thread Jeremy Burns | Class Outfit
Your css files go in /app/webroot/css/. You include them by putting echo 
$this-Html-css(array('filename')); in the head section of your layout.

You do your data retrieval in the controller, although your function actually 
calls methods of the models, which do all of the database heavy lifting (e.g. 
$this-User-find('all'); - this is run from the users controller and talks to 
the user model).

You don't want to call profile.php as the action of the form -- use the form 
helper instead which calls the right controller/model combination. This is pure 
MVC stuff - it's different to doing usual php.

I'd recommend looking at the tutorial (http://book.cakephp.org/view/1528/Blog) 
because that will cover the bases.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 2 Jul 2010, at 16:29, Tomfox Wiranata wrote:

 hi,
 
 before i used cakephp i designed a layout with CSS naked (no
 framework, no CMS) to show a members profile. now, i am asking myself
 how to make this work in cakephp.
 
 this is what i got worked so far:
 
 i put all my divs containers into a view template:
 div class=frame
   div class=rightcolumn
   div class=databox
   div class=titleAllgemeines/div
   form action= method=post name=profile 
 id=profile
   div class=row
   span class=labelVorname/span
   span class=profiledata?php echo 
 $row['firstname'];?/span
   /div
 
   div class=row
   span class=labelNachname/span
   span class=profiledata?php echo 
 $row['name'];?/span
   /div
 
   div class=row
   span class=labelNickname/span
   span class=profiledata?php echo 
 $row['nickname'];?/span
   /div
 
   div class=row
   span class=labelMitglied seit/span
   span class=profiledata?php echo 
 $row['date_created'];?/
 span
   /div
   /form
   /div
 
   form action=profile.php method=post name=gotoEdit
 id=gotoEdit
   div class=buttoninput name=editProfile 
 type=submit
 id=editProfile value=Ändern //div
   /form
 
   /div
 
 /div
 /div
 
 now, where do i put my css file (where all the divs are defined)? is
 there a special folder for that? and where do i inlcude this file in
 my code to tell cake to use this specific css file?
 
 do i retrieve the user information for his profile in my controller?
 probably with the find method?
 do i put the code to print/show the information in my model?
 
 right now i am using a loop to show the data:
   div class=row
   span class=labelMitglied seit/span
   span class=profiledata?php echo 
 $row['date_created'];?/
 span
   /div
 
 but that wont work with cake
 
 so technically i dont know how to tell cake to use my css file, where
 (model or controller) to get the data from the table, and how/where to
 show the data (model or controller) that it appears in my divs
 
 any help would be great. thx s much
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: making a layout with CSS in CakePHP

2010-07-02 Thread Tomfox Wiranata
thanks a lot for the very quick answer...i'll give it a try :)

On 2 Jul., 17:36, Jeremy Burns | Class Outfit
jeremybu...@classoutfit.com wrote:
 Your css files go in /app/webroot/css/. You include them by putting echo 
 $this-Html-css(array('filename')); in the head section of your layout.

 You do your data retrieval in the controller, although your function actually 
 calls methods of the models, which do all of the database heavy lifting (e.g. 
 $this-User-find('all'); - this is run from the users controller and talks 
 to the user model).

 You don't want to call profile.php as the action of the form -- use the form 
 helper instead which calls the right controller/model combination. This is 
 pure MVC stuff - it's different to doing usual php.

 I'd recommend looking at the tutorial 
 (http://book.cakephp.org/view/1528/Blog) because that will cover the bases.

 Jeremy Burns
 Class Outfit

 jeremybu...@classoutfit.comhttp://www.classoutfit.com

 On 2 Jul 2010, at 16:29, Tomfox Wiranata wrote:

  hi,

  before i used cakephp i designed a layout with CSS naked (no
  framework, no CMS) to show a members profile. now, i am asking myself
  how to make this work in cakephp.

  this is what i got worked so far:

  i put all my divs containers into a view template:
  div class=frame
     div class=rightcolumn
             div class=databox
                     div class=titleAllgemeines/div
                     form action= method=post name=profile 
  id=profile
                     div class=row
                             span class=labelVorname/span
                             span class=profiledata?php echo 
  $row['firstname'];?/span
                     /div

                     div class=row
                             span class=labelNachname/span
                             span class=profiledata?php echo 
  $row['name'];?/span
                     /div

                     div class=row
                             span class=labelNickname/span
                             span class=profiledata?php echo 
  $row['nickname'];?/span
                     /div

                     div class=row
                             span class=labelMitglied seit/span
                             span class=profiledata?php echo 
  $row['date_created'];?/
  span
                     /div
                     /form
             /div

             form action=profile.php method=post name=gotoEdit
  id=gotoEdit
                     div class=buttoninput name=editProfile 
  type=submit
  id=editProfile value=Ändern //div
             /form

     /div

  /div
  /div

  now, where do i put my css file (where all the divs are defined)? is
  there a special folder for that? and where do i inlcude this file in
  my code to tell cake to use this specific css file?

  do i retrieve the user information for his profile in my controller?
  probably with the find method?
  do i put the code to print/show the information in my model?

  right now i am using a loop to show the data:
                     div class=row
                             span class=labelMitglied seit/span
                             span class=profiledata?php echo 
  $row['date_created'];?/
  span
                     /div

  but that wont work with cake

  so technically i dont know how to tell cake to use my css file, where
  (model or controller) to get the data from the table, and how/where to
  show the data (model or controller) that it appears in my divs

  any help would be great. thx s much

  Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
  with their CakePHP related questions.

  You received this message because you are subscribed to the Google Groups 
  CakePHP group.
  To post to this group, send email to cake-php@googlegroups.com
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en