Re: How to do just a view ?

2008-02-04 Thread zeugme





Ola Juan !

Thanks a lot : you gave me the keywords I didn't had that prevent me
for searching more !
($uses and _javascript_ helper)

Thanks again.

Juan F. Gimenez Silva wrote:

  
El lun, 04-02-2008 a las 02:21 -0800, zeugme escribi:
  
  
Hi,


  
  Hello (also, hello to all bakers!),

  
  
I'm new in CakePHP, amazingly, I choose CakePHP for the power of MVC,
SQL mapping ...

  
  It's nice to hear that, I'm pretty much a newbie too.

  
  
but I need to deal with my home page witch have no model.
This page however is not purely static, it contains PHP, SQL ...

Where do I put such files ?
/app/webroot ?
or
/app/view.pages ?


  
  
I think the easiest way to do that would be to create a controller with
a home() action that uses (see the $uses variables) the models where you
need to get the data for the home page. That way you can create methods
on the models involved to return the data, so, no need for SQL at all.

  
  
What are the differences between those 2 folders ?

This page also rely on some _javascript_ framework (JQuery).
Where do I put my jquery.js file ?
If I put it inside app/webroot/js it doesn't appears to be taken into
account ...
It's like if I had to put that general js files at the physical root,
the folder that contains /app.

  
  
No, you have to put it in app/webroot/js, and load it using the
_javascript_ Helper, remember to load the helper on the appropiate
controller.

  
  
Maybe there is some doc I should read ? I read the manual, tuto,
browse the bakery and did not found, but that do not mean it doesn't
exists :-)


  
  
  
  
Thanks for your help !


  
  I hope that helps!




  



--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php?hl=en  -~--~~~~--~~--~--~---





Re: How to do just a view ?

2008-02-04 Thread jakecake

Put your static pages in /view/pages/ (ex. /view/pages/mypage.ctp).
Then browse it from http://.../pages/ (ex. http://.../pages/mypage)

And read the doc like said Thrilller ;)

Jakecake
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to do just a view ?

2008-02-04 Thread Thrilller

Dear.
answers of all you question are there in cakephp manual.
you need to study it properly
http://manual.cakephp.org/
practics a bit by making sample applications Blog,Auth etc
there in manual and then try to switch you exiting code to cakephp.


On Feb 4, 3:21 pm, zeugme [EMAIL PROTECTED] wrote:
 Hi,

 I'm new in CakePHP, amazingly, I choose CakePHP for the power of MVC,
 SQL mapping ...
 but I need to deal with my home page witch have no model.
 This page however is not purely static, it contains PHP, SQL ...

 Where do I put such files ?
 /app/webroot ?
 or
 /app/view.pages ?

 What are the differences between those 2 folders ?

 This page also rely on some javascript framework (JQuery).
 Where do I put my jquery.js file ?
 If I put it inside app/webroot/js it doesn't appears to be taken into
 account ...
 It's like if I had to put that general js files at the physical root,
 the folder that contains /app.

 Maybe there is some doc I should read ? I read the manual, tuto,
 browse the bakery and did not found, but that do not mean it doesn't
 exists :-)

 Thanks for your help !
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to do just a view ?

2008-02-04 Thread Juan F. Gimenez Silva


El lun, 04-02-2008 a las 02:21 -0800, zeugme escribió:
 Hi,
 
Hello (also, hello to all bakers!),

 I'm new in CakePHP, amazingly, I choose CakePHP for the power of MVC,
 SQL mapping ...
It's nice to hear that, I'm pretty much a newbie too.

 but I need to deal with my home page witch have no model.
 This page however is not purely static, it contains PHP, SQL ...
 
 Where do I put such files ?
 /app/webroot ?
 or
 /app/view.pages ?
 

I think the easiest way to do that would be to create a controller with
a home() action that uses (see the $uses variables) the models where you
need to get the data for the home page. That way you can create methods
on the models involved to return the data, so, no need for SQL at all.

 What are the differences between those 2 folders ?
 
 This page also rely on some javascript framework (JQuery).
 Where do I put my jquery.js file ?
 If I put it inside app/webroot/js it doesn't appears to be taken into
 account ...
 It's like if I had to put that general js files at the physical root,
 the folder that contains /app.

No, you have to put it in app/webroot/js, and load it using the
JavaScript Helper, remember to load the helper on the appropiate
controller.

 
 Maybe there is some doc I should read ? I read the manual, tuto,
 browse the bakery and did not found, but that do not mean it doesn't
 exists :-)
 

 Thanks for your help !
 
I hope that helps!


--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---