Related data when using pages controller

2013-01-11 Thread Devario Johnson
Just an fyi for anyone who may have an issue in 2.x when viewing a 
pr($this-Model-find('all'); from the pages controller, make sure that 
first letter is capitalized (which is what you should be doing anyway). 
 lol  I spent a few minutes trying to find out why the heck none of the 
relations were coming through, when the issue was that in the $uses array, 
I had specified the model with a lowercase instead of an uppercase, which 
as soon as I corrected that and updated the corresponding calls all was 
back to normal.  

Just wanna save someone some time if searching on this.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: cake 2.x auth component bugs with pages controller after changing htaccess files

2012-05-19 Thread Jimit Kapadya
Hello All,

how to delete Multiple tables fields values in cakephp 2.0

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: cake 2.x auth component bugs with pages controller after changing htaccess files

2012-05-19 Thread Miloš Vučinić
You can make a sql qury which will delete all from given range.. I
think it would be best for performances as well

On May 19, 4:55 am, Jimit Kapadya ji...@entourage.in wrote:
 Hello All,

 how to delete Multiple tables fields values in cakephp 2.0

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


cake 2.x auth component bugs with pages controller after changing htaccess files

2012-05-18 Thread Miloš Vučinić
Hi,

this is really strange question. I made a simple web presentation (so
far I have used cake 1.3 this is my first 2.x project), and added AUTH
component looking at the tutorial from this link :
http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.html

Ok so here is my problem. I have overridden pages controller and made
4 more. They all run perfectly in local host, however , only pages
controller bugs on the server. In order to upload code and make it
work I had to change my 3 htaccess files , because sever was giving me
internal sever error without base variable.

Now here is the funny part. The pages controller shows blank page with
no errors, even in debug mode 2, whenever I try to access any of the
functions for which you have to be logged in to use. Only pages
controller, which doesn't use anything unusual, or unstandard. Just a
plain blank page and only on that server. In local host it runs
normaly.

So I did the following :
1) I checked if there is any blank space left - no
2) I checked if allowed functions work - they do
3) When I put smth in before filter and do var_dump it prints it.
4) I tried to print user from session of from auth component , I get
null - although in other controllers it works ok
5) This all happens regardless if I am loged in or out
6) I do not get redirected when the function is allowed for normal
users, I only get the blank page , i checked to surce of the page,
nothing, just html and body tags empty again
7) when i make auth-allow('*') everything runs ok. So only the
functions which are not allowed.

Since I wasted a whole day on this, I am going to rename the
controller and try again because all others are working fine, and in
local host even pages work fine. I suppose that since I had to change
htaccess files, auth component bugs, but I cant guess what.

I will post update about this, however if someone had a similar
situation and solved it please help.

I guess somehow I got different sessions for these controllers but I
have no idea how or why... 0.O

ty in advance

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: cake 2.x auth component bugs with pages controller after changing htaccess files

2012-05-18 Thread Miloš Vučinić
I figured id out.. So I did have a char in the end of my while it is
because I maade my controller UTF 8 beacuse of some warnings that I
needed to make in serbian. However, I didn't make it utf 8 without BOM
(notepad ++ has that option), lousy missclick

Strange things are the following :

in local host , it worked 0.O
second thing is, ACL-Allow worked when you make all allowed but
doesn't when you need to check if someone is logged in. This behaviour
is super strange, because only AUTH component had the problem with my
controller. If it was allowed it worked ..

Anywyas LOZ .. I just wasted a day on that .. But at least its
over ..

On 18 мај, 23:35, Miloš Vučinić milosvuci...@gmail.com wrote:
 Hi,

 this is really strange question. I made a simple web presentation (so
 far I have used cake 1.3 this is my first 2.x project), and added AUTH
 component looking at the tutorial from this link 
 :http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-cont...

 Ok so here is my problem. I have overridden pages controller and made
 4 more. They all run perfectly in local host, however , only pages
 controller bugs on the server. In order to upload code and make it
 work I had to change my 3 htaccess files , because sever was giving me
 internal sever error without base variable.

 Now here is the funny part. The pages controller shows blank page with
 no errors, even in debug mode 2, whenever I try to access any of the
 functions for which you have to be logged in to use. Only pages
 controller, which doesn't use anything unusual, or unstandard. Just a
 plain blank page and only on that server. In local host it runs
 normaly.

 So I did the following :
 1) I checked if there is any blank space left - no
 2) I checked if allowed functions work - they do
 3) When I put smth in before filter and do var_dump it prints it.
 4) I tried to print user from session of from auth component , I get
 null - although in other controllers it works ok
 5) This all happens regardless if I am loged in or out
 6) I do not get redirected when the function is allowed for normal
 users, I only get the blank page , i checked to surce of the page,
 nothing, just html and body tags empty again
 7) when i make auth-allow('*') everything runs ok. So only the
 functions which are not allowed.

 Since I wasted a whole day on this, I am going to rename the
 controller and try again because all others are working fine, and in
 local host even pages work fine. I suppose that since I had to change
 htaccess files, auth component bugs, but I cant guess what.

 I will post update about this, however if someone had a similar
 situation and solved it please help.

 I guess somehow I got different sessions for these controllers but I
 have no idea how or why... 0.O

 ty in advance

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Cakephp session is not setting in pages controller

2010-06-01 Thread Binu
Thanks for the reply.. It is just a typo.. Actually it contains, the
code for selecting data from database. So I removed that part while
posting here.

On May 28, 5:51 pm, John Andersen j.andersen...@gmail.com wrote:
 I assume you copy/pasted the code into the post, so I have to tell you
 that you have an error in your echo statement! One left bracket too
 much! Please clarify whether that was a typo and if removed, fixed
 your issue!

 In stead of using echo in your controller, turn on debugging in the
 config/core.php file and use the statement:
 [code]
 debug($this-Session-read('user_id'));
 [/code]

 Enjoy,
    John

 On May 28, 3:36 pm, Binu bino...@gmail.com wrote:

  ?php
  class PagesController extends AppController{

          var $components = array('Session');
          var $uses = array('Page','PageComment');

        function display() {
             echo $this-Session-read(('user_id');
        }}

  ?

  On May 27, 7:22 pm, John Andersen j.andersen...@gmail.com wrote:

   How does your pages controller look like, the code?
   Enjoy,
      John

   On May 27, 10:11 am, Binu bino...@gmail.com wrote:

Hi,

I am using cakephp1.2 . I have override the pages controller. While
login from my application, Im setting thesessionand redirecting to
pages controller, but there I couldnotable to get thesession. If I
redirect to some other controller, Im getting thesessionover there.
I have a table with name pages, and when the user clicks on the
links (passing page name), Im taking data from that table and
displaying using pages_controller.

Can Inotuse pages as table name ? Orsessionwon't work in
pages_controller ?

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: Cakephp session is not setting in pages controller

2010-05-28 Thread Binu

?php
class PagesController extends AppController{

var $components = array('Session');
var $uses = array('Page','PageComment');

  function display() {
   echo $this-Session-read(('user_id');
  }
}
?

On May 27, 7:22 pm, John Andersen j.andersen...@gmail.com wrote:
 How does your pages controller look like, the code?
 Enjoy,
    John

 On May 27, 10:11 am, Binu bino...@gmail.com wrote:

  Hi,

  I am using cakephp1.2 . I have override the pages controller. While
  login from my application, Im setting thesessionand redirecting to
  pages controller, but there I couldnotable to get thesession. If I
  redirect to some other controller, Im getting thesessionover there.
  I have a table with name pages, and when the user clicks on the
  links (passing page name), Im taking data from that table and
  displaying using pages_controller.

  Can Inotuse pages as table name ? Orsessionwon't work in
  pages_controller ?

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: Cakephp session is not setting in pages controller

2010-05-28 Thread John Andersen
I assume you copy/pasted the code into the post, so I have to tell you
that you have an error in your echo statement! One left bracket too
much! Please clarify whether that was a typo and if removed, fixed
your issue!

In stead of using echo in your controller, turn on debugging in the
config/core.php file and use the statement:
[code]
debug($this-Session-read('user_id'));
[/code]

Enjoy,
   John

On May 28, 3:36 pm, Binu bino...@gmail.com wrote:
 ?php
 class PagesController extends AppController{

         var $components = array('Session');
         var $uses = array('Page','PageComment');

       function display() {
            echo $this-Session-read(('user_id');
       }}

 ?

 On May 27, 7:22 pm, John Andersen j.andersen...@gmail.com wrote:

  How does your pages controller look like, the code?
  Enjoy,
     John

  On May 27, 10:11 am, Binu bino...@gmail.com wrote:

   Hi,

   I am using cakephp1.2 . I have override the pages controller. While
   login from my application, Im setting thesessionand redirecting to
   pages controller, but there I couldnotable to get thesession. If I
   redirect to some other controller, Im getting thesessionover there.
   I have a table with name pages, and when the user clicks on the
   links (passing page name), Im taking data from that table and
   displaying using pages_controller.

   Can Inotuse pages as table name ? Orsessionwon't work in
   pages_controller ?

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


Cakephp session is not setting in pages controller

2010-05-27 Thread Binu
Hi,

I am using cakephp1.2 . I have override the pages controller. While
login from my application, Im setting the session and redirecting to
pages controller, but there I could not able to get the session. If I
redirect to some other controller, Im getting the session over there.
I have a table with name pages, and when the user clicks on the
links (passing page name), Im taking data from that table and
displaying using pages_controller.

Can I not use pages as table name ? Or session won't work in
pages_controller ?

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: Cakephp session is not setting in pages controller

2010-05-27 Thread John Andersen
How does your pages controller look like, the code?
Enjoy,
   John

On May 27, 10:11 am, Binu bino...@gmail.com wrote:
 Hi,

 I am using cakephp1.2 . I have override the pages controller. While
 login from my application, Im setting the session and redirecting to
 pages controller, but there I could not able to get the session. If I
 redirect to some other controller, Im getting the session over there.
 I have a table with name pages, and when the user clicks on the
 links (passing page name), Im taking data from that table and
 displaying using pages_controller.

 Can I not use pages as table name ? Or session won't work in
 pages_controller ?

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


Pages Controller

2009-10-21 Thread Dave Maharaj :: WidePixels.com
I have my site index www.site/ go to 
 
Router::connect('/', array(
  'controller' = 'pages',
  'action' = 'display',
  'home')); 
 
 
How can I set it to check if logged in to redirect somewhere, define
template layout and general function stuff? Do you make a normal function
home(){} just with no model interaction?
 
Cant seem to find much info on the pages_controller setup.
 
Thanks,
 
Dave

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



CMS for pages controller

2009-10-06 Thread Olwen Williams

I have an older install of cakePHP with some static pages.  I'd like
to replace the pages controller with a very simple cms.  I looked
through the forger and could not find what I wanted (signs of senility
I expect).  Can someone point me to something?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Pages Controller issue

2007-11-21 Thread mehodgson

I am working on an ecommerce site using v1.2 and I am having a weird
problem with anything static pages run through the pages
controller.

The navigation is set up to dynamically pull the product information
from the database to create all of the necessary links. I currently
have the appController set like this:

class AppController extends Controller
{
var $components = array('Session');
var $uses = array('Product');

function beforeFilter()
{
$subProducts = $this-Product-
findAll('Product.status='.PRODUCT_ACTIVE,null,null,2); // this is
line 48 referred to in the error below
$this-set('subProducts', $subProducts);
}
}


 It works for perfectly for any of the pages that are run through any
of the other controllers, but the pages controller gives me this
message:

Fatal error: Call to a member function on a non-object in
(directory_path)/app/app_controller.php on line 48

Just as an experiment I set $uses = array('Product'); in the pages
controller and the dynamic navigation worked, but as expected I get
the missing model error for pages.

It seems like setting $uses = null; in the pages controller is
overriding the $uses=array('Product'); in the app controller and
causing the $this-Products fatal call to a member functionon a non-
object.

Does anyone have any suggestions on how to deal with this?
--~--~-~--~~~---~--~~
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: Pages Controller issue

2007-11-21 Thread Walker Hamilton

Read this: 
http://cakebaker.42dh.com/2007/10/30/what-i-didnt-knew-about-controllers-without-models/
--~--~-~--~~~---~--~~
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: Pages Controller issue

2007-11-21 Thread the_woodsman

Complete stab in the dark here...

I remember a blog post somewhere about the difference between setting
$uses to null or to an empty array.

This was the best google hit:

http://groups.google.es/group/tickets-cakephp/browse_thread/thread/57d2165f775020e8

Hope thats relevant...



On Nov 21, 2:54 pm, mehodgson [EMAIL PROTECTED] wrote:
 I am working on an ecommerce site using v1.2 and I am having a weird
 problem with anything static pages run through the pages
 controller.

 The navigation is set up to dynamically pull the product information
 from the database to create all of the necessary links. I currently
 have the appController set like this:

 class AppController extends Controller
 {
 var $components = array('Session');
 var $uses = array('Product');

 function beforeFilter()
 {
 $subProducts = 
 $this-Product-findAll('Product.status='.PRODUCT_ACTIVE,null,null,2); // 
 this is

 line 48 referred to in the error below
 $this-set('subProducts', $subProducts);
 }

 }

  It works for perfectly for any of the pages that are run through any
 of the other controllers, but the pages controller gives me this
 message:

 Fatal error: Call to a member function on a non-object in
 (directory_path)/app/app_controller.php on line 48

 Just as an experiment I set $uses = array('Product'); in the pages
 controller and the dynamic navigation worked, but as expected I get
 the missing model error for pages.

 It seems like setting $uses = null; in the pages controller is
 overriding the $uses=array('Product'); in the app controller and
 causing the $this-Products fatal call to a member functionon a non-
 object.

 Does anyone have any suggestions on how to deal with this?
--~--~-~--~~~---~--~~
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: Pages Controller issue

2007-11-21 Thread mehodgson

I tried switching the pages controller to $uses = array(); and now I
get this error:

Missing controller

You are seeing this error because controller Controller could not be
found.

Notice: If you want to customize this error message, create app/views/
errors/missing_controller.ctp

Fatal: Create the class below in file: app/controllers/controller.php

?php
class Controller extends AppController {
   var $name = '';
}
?

Did they change this behavior in the newest build of 1.2?


On Nov 21, 1:05 pm, Walker Hamilton [EMAIL PROTECTED] wrote:
 Read 
 this:http://cakebaker.42dh.com/2007/10/30/what-i-didnt-knew-about-controll...
--~--~-~--~~~---~--~~
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: Pages Controller issue

2007-11-21 Thread mehodgson

Never mind that last question...had a typo in my routes that was
causing the problem.

Thanks.

On Nov 21, 1:33 pm, mehodgson [EMAIL PROTECTED] wrote:
 I tried switching the pages controller to $uses = array(); and now I
 get this error:

 Missing controller

 You are seeing this error because controller Controller could not be
 found.

 Notice: If you want to customize this error message, create app/views/
 errors/missing_controller.ctp

 Fatal: Create the class below in file: app/controllers/controller.php

 ?php
 class Controller extends AppController {
var $name = '';}

 ?

 Did they change this behavior in the newest build of 1.2?

 On Nov 21, 1:05 pm, Walker Hamilton [EMAIL PROTECTED] wrote:

  Read 
  this:http://cakebaker.42dh.com/2007/10/30/what-i-didnt-knew-about-controll...
--~--~-~--~~~---~--~~
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: layout control with default pages controller.

2007-11-06 Thread thathu


I am new to cake as well, but this is what I did to create a new layout
called profile.

?php
class ProfileController extends AppController {
var $name = 'Profile';
var $layout = 'profile';
var $uses = array();

function index() {
$this-pageTitle = 'User Profile';
}
} 

Now I put my page design in profile.thtml in the layout folder and just make
a forward to to /profile/index. That just worked.






jmw-2 wrote:
 
 
 I have a very simple site and am new to cake, but not MVC frameworks.
 I currently use the default Pages controller to render the pages in
 the site, very few of them need their own customer controller /
 logic.  I do however need some of them to switch to a different
 layout. I have defined a default layout, and am trying to find a way
 to specify that a page should be rendered with another layout, via a
 routes call, or some other call at the top of the template page, or a
 request parameter.
 
 
  
 
 

-- 
View this message in context: 
http://www.nabble.com/layout-control-with-default-pages-controller.-tf4749421.html#a13612477
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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: layout control with default pages controller.

2007-11-05 Thread Frank

If you however want to switch layouts with a parameter you could do it
like this

class PagesController extends AppController
{
function info($layout = null)
{
switch($layout)
{
case 'spring' :
$this-layout = 'spring';
break;
case 'summer' :
$this-layout = 'summer';
break;
default :
$this-layout = 'default';
break;
}

// other stuff
}
}

haven't tested this but i hope it points you in the right direction :)

On Nov 5, 4:01 am, jmw [EMAIL PROTECTED] wrote:
 I have a very simple site and am new to cake, but not MVC frameworks.
 I currently use the default Pages controller to render the pages in
 the site, very few of them need their own customer controller /
 logic.  I do however need some of them to switch to a different
 layout. I have defined a default layout, and am trying to find a way
 to specify that a page should be rendered with another layout, via a
 routes call, or some other call at the top of the template page, or a
 request parameter.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



layout control with default pages controller.

2007-11-04 Thread jmw

I have a very simple site and am new to cake, but not MVC frameworks.
I currently use the default Pages controller to render the pages in
the site, very few of them need their own customer controller /
logic.  I do however need some of them to switch to a different
layout. I have defined a default layout, and am trying to find a way
to specify that a page should be rendered with another layout, via a
routes call, or some other call at the top of the template page, or a
request parameter.


--~--~-~--~~~---~--~~
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: layout control with default pages controller.

2007-11-04 Thread Grant Cox

The easiest way is to have

$this-layout = 'other_layout'

in the actual view file, rather than messing with routes/ request
params.


--~--~-~--~~~---~--~~
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: routing issue with Pages Controller in Cake 1.2 - trailing slash included not working

2007-06-06 Thread luke BAKING barker

I made my own pages_controller and put it in app/controllers

I Added this to line 78

// DIFFERS from core ---
// hack for trail slash issue
// pr($path);
//  exit();
if(count($path  1)) {
if (strlen(end($path)) === 0) {
unset($path[count($path) - 1]);
}
}


It seems to have fixed it and not broken other pages, or even nested
ones.

Thought I would post for anyone else who might have this issue. I dont
know if it is deriving from xampp or what...

Luke
On Jun 4, 12:43 pm, luke BAKING barker [EMAIL PROTECTED] wrote:
 If a pages URL is specified with the last argument having a slash
 after it, the view is not rendered, e.g.
 /pages/faq/ yields:

 You are seeing this error because the view for
 PagesController::display(), could not be found.

 Notice: If you want to customize this error message, create app/views/
 errors/missing_view.ctp

 Fatal: Confirm you have created the file: /Applications/xampp/htdocs/
 cake_IET_1.2.0.5/app/views/pages/faq/.ctp

 yet /pages/faq works fine

 I just upgraded to Cake 1.2 latest nightly, but I was running off of
 Cake 1.2.0.5146alpha before and had the same issue.

 I am running on Mac Os 10.4.8 using XAMPP for Mac (MAMPP) - but my 1.1
 apps all worked fine in this way.

 Also the problem occurs with debug set to 0, 1 or 2.

 Any ideas? I know the routing was rewritten for cake 1.2, perhaps I am
 missing a simple fix/issue/gotcha?

 I searched on the group but havent found anything - I'm inexpereinced
 with htaccess rewrites/routes stuff so I am not sure of the best way
 to gettrailingslashes ignored or rewritten etc.

 many thanks for any help

 Luke


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



routing issue with Pages Controller in Cake 1.2 - trailing slash included not working

2007-06-04 Thread luke BAKING barker

If a pages URL is specified with the last argument having a slash
after it, the view is not rendered, e.g.
/pages/faq/ yields:

You are seeing this error because the view for
PagesController::display(), could not be found.

Notice: If you want to customize this error message, create app/views/
errors/missing_view.ctp

Fatal: Confirm you have created the file: /Applications/xampp/htdocs/
cake_IET_1.2.0.5/app/views/pages/faq/.ctp

yet /pages/faq works fine

I just upgraded to Cake 1.2 latest nightly, but I was running off of
Cake 1.2.0.5146alpha before and had the same issue.

I am running on Mac Os 10.4.8 using XAMPP for Mac (MAMPP) - but my 1.1
apps all worked fine in this way.

Also the problem occurs with debug set to 0, 1 or 2.

Any ideas? I know the routing was rewritten for cake 1.2, perhaps I am
missing a simple fix/issue/gotcha?

I searched on the group but havent found anything - I'm inexpereinced
with htaccess rewrites/routes stuff so I am not sure of the best way
to get trailing slashes ignored or rewritten etc.

many thanks for any help

Luke


--~--~-~--~~~---~--~~
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: Sub-folders in pages controller

2007-05-25 Thread AD7six



On May 22, 1:05 am, gmwebs [EMAIL PROTECTED] wrote:
 How do I configure the following? I am using 1.2.0.5137

 I want to organise my static pages in subfolders so that views/pages/
 products/product1 points towww.mydomain.com/products/product1.

it does that as it comes out of the box, unless you are referring to
the fact that you want a route directly off the root (for the above
you would need a route for /*), in which case see the article on the
bakery on the very topic. Why put your product pages as static pages
though - doesn't seem like the best idea.

hth,

AD


--~--~-~--~~~---~--~~
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: Sub-folders in pages controller

2007-05-25 Thread gmwebs

I have a work around, but I had to add in a route for each product
group. It is working now though...

As for the reason behind making the pages static, they only have 8
products and they just want an exact copy and paste from the old to
the new site. Also, they want to be able to edit the xhtml themselves
without getting in to the code side of things.

Thanks for the reply though...

On 25 May, 08:44, AD7six [EMAIL PROTECTED] wrote:
 On May 22, 1:05 am, gmwebs [EMAIL PROTECTED] wrote:

  How do I configure the following? I am using 1.2.0.5137

  I want to organise my static pages in subfolders so that views/pages/
  products/product1 points towww.mydomain.com/products/product1.

 it does that as it comes out of the box, unless you are referring to
 the fact that you want a route directly off the root (for the above
 you would need a route for /*), in which case see the article on the
 bakery on the very topic. Why put your product pages as static pages
 though - doesn't seem like the best idea.

 hth,

 AD


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Sub-folders in pages controller

2007-05-21 Thread gmwebs

How do I configure the following? I am using 1.2.0.5137

I want to organise my static pages in subfolders so that views/pages/
products/product1 points to www.mydomain.com/products/product1.

I have found plenty of documentation on how to configure routes for
normal controller/actions but I can't seem to get it working with the
pages controller.

Any help will be appreciated.

Graham


--~--~-~--~~~---~--~~
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: Pages Controller problem

2007-01-21 Thread Jonathon Davis

So No one has an answer to this?


--~--~-~--~~~---~--~~
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: Pages Controller problem

2007-01-21 Thread Dr. Tarique Sani

On 1/22/07, Jonathon Davis [EMAIL PROTECTED] wrote:
  So No one has an answer to this?
I could not download your zip file for some reason - Can you paste
just the app_controller into the cake bin ?

Also did you try using loadModel('Setting');

Perhaps you can take a look at the code of app_controller for
Cheescake-photoblog where we are doing a similar thing via a component
and I do get all the settings in Pages controller as well

HTH
Tarique

-- 
=
PHP Applications for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
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: Pages Controller problem

2007-01-18 Thread Max


You can paste full code here.. This must not be a big problem..

BTW, Did you ever used bake ?


--~--~-~--~~~---~--~~
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: Pages Controller problem

2007-01-18 Thread Jonathon Davis


Well, I'm not sure what file the problem is in, so I zipped up the only
files it could really be a problem with and uploaded it on to this
group's files page.

http://groups-beta.google.com/group/cake-php/web/pages_controller_problem.zip

If someone could open it up and tell me what you think the problem is,
I would greatly appreciate it. Don't worry, I cut out everything except
for a few files. Zip file is under 100k I believe.

And yes, I've used bake for almost every model/view/controller that I
have, but the Pages Controller is a built-in controller, not one that I
created.


--~--~-~--~~~---~--~~
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: Pages Controller problem

2007-01-18 Thread Jonathon Davis


I have some insight. I realized this when I created another item in my
website... I think it may have to do with the Pages Controller not
having its own model. Anyone following me on this? I tried to create a
controller/view without a model (because I really don't need one in
this case) and it gave me the same error as the Pages Controller does.
I commented out the stuff for the settings and it displayed the Cake
warning of having no model. I created a model for it, uncommented the
stuff for the settings, and bada-bing. No error message.

Any way to combat this?


--~--~-~--~~~---~--~~
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: Pages Controller problem

2007-01-18 Thread Watts Martin


On Jan 18, 12:20 pm, Jonathon Davis [EMAIL PROTECTED] wrote:

I have some insight. I realized this when I created another item in my
website... I think it may have to do with the Pages Controller not
having its own model. Anyone following me on this? I tried to create a
controller/view without a model (because I really don't need one in
this case) and it gave me the same error as the Pages Controller does.
I commented out the stuff for the settings and it displayed the Cake
warning of having no model. I created a model for it, uncommented the
stuff for the settings, and bada-bing. No error message.

Any way to combat this?


The $uses variable is what you normally use in a controller without a
model, apparently. (I'm just learning this myself.) In your zip file,
you have pages_controller.php with the line:

var $uses = array('Page', 'Setting');

But there is no 'Page' model; in theory all you should have is

var $uses = array('Setting');

to make this work.

I'm confused by your earlier comment about putting that in
app_controller.php, though -- AFAIK, you shouldn't have to monkey
around in any of CakePHP's internals like that, and I suspect doing so
may be causing new mysterious errors for you rather than solving them.
I'd really suggest putting everything in the cake/libs/ directory back
the way it was.


--~--~-~--~~~---~--~~
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: Pages Controller problem

2007-01-18 Thread Jonathon Davis


Well, if that was the case, then it should have recognized $uses =
array('Setting', 'Link') in my app_controller.php file even before I
started modifying other things.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Pages Controller problem

2007-01-17 Thread Jonathon Davis


I have a model/view/controller for site-wide settings called... well...
Settings.

The problem is, no matter what I do, it never seems to get into the
pages controller properly.

I have $uses = array('Setting') in /app/app_controller.php and I even
tracked down the pages controller in /cake/libs/controller/ and put it
in there too. I've also tried putting it into controller.php but I
still can't get it to work.

It gives me this error:

Notice: Undefined property: AppController::$Setting in
/var/www/cake/app/app_controller.php on line 24

Fatal error: Call to a member function find() on a non-object in
/var/www/cake/app/app_controller.php on line 24

All other (non-default) controllers handle it ok. I am only having
problems with this in the pages controller.

Help would be greatly appreciated.  Thanks in advance.


--~--~-~--~~~---~--~~
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: Pages Controller problem

2007-01-17 Thread Jonathon Davis


One other note, I am running version 1.1.10.3825. I wouldn't mind
upgrading as long as nothing changes in my app file structure/naming.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



passing data from database to pages controller

2007-01-15 Thread sentel


Hi All,

first, I'm a bit of a newby to cakephp, but already loving it.

I made some models, associations, controllers etc and I'm still using
scaffolding (suites for now) to manage the contents of the database.
Then I made some pages wich soon became something like a website.

I came across a problem: How to pass data from the database (using the
models) to the pagescontroller.

I'm almost sure that there has to be a simple way to do that.
At the moment I used the following as a solution:

I created a basic page model and copied the pages controller from the
lib/controllers directory to my own controllers directory. In the pages
controller I made var $uses = array('Package') ... (the model I want to
use) and then $this-set('packages',$this-Package-findAll());

Now I can use the data from the Package model.

Is this the way or is there a standard way to do this?

Another way could be to extend the PagesController, but what name
should I give it and in what file does that go. That way I can avoid
copying the pages_controller file.

Please 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: passing data from database to pages controller

2007-01-15 Thread John David Anderson (_psychic_)



On Jan 15, 2007, at 3:16 PM, sentel wrote:



Hi All,

first, I'm a bit of a newby to cakephp, but already loving it.

I made some models, associations, controllers etc and I'm still using
scaffolding (suites for now) to manage the contents of the database.
Then I made some pages wich soon became something like a website.

I came across a problem: How to pass data from the database (using the
models) to the pagescontroller.

I'm almost sure that there has to be a simple way to do that.
At the moment I used the following as a solution:

I created a basic page model and copied the pages controller from the
lib/controllers directory to my own controllers directory. In the  
pages
controller I made var $uses = array('Package') ... (the model I  
want to

use) and then $this-set('packages',$this-Package-findAll());

Now I can use the data from the Package model.

Is this the way or is there a standard way to do this?


Usually the PagesController is used only for static content delivery.

That said, you've just created a controller with models tied to a  
view... something that everyone should do all the time.



Another way could be to extend the PagesController, but what name
should I give it and in what file does that go. That way I can avoid
copying the pages_controller file.


Just create your own PackagesController, that already has access to  
the Package model.


-- John

--~--~-~--~~~---~--~~
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: passing data from database to pages controller

2007-01-15 Thread sentel


Thanks, that changed my view on things.

/packages works fine.
I now set cake to use admin routing.
/admin/packages works too, but not the scaffold and layout

My PackagesController looks like this

?php
class PackagesController extends AppController {
var $name = 'Packages';

   function admin_index() {
$this-scaffold= true;
$this-layout= 'scaffolding';
$this-checkSession();
$this-set('packages',$this-Package-findAll());

   }

   function index() {
$this-set('packages',$this-Package-findAll());
   }
}
?

How do I set scaffold and a specific layout for controller actions
individually?

On 15 jan, 23:42, John David Anderson (_psychic_)
[EMAIL PROTECTED] wrote:

On Jan 15, 2007, at 3:16 PM, sentel wrote:





 Hi All,

 first, I'm a bit of a newby to cakephp, but already loving it.

 I made some models, associations, controllers etc and I'm still using
 scaffolding (suites for now) to manage the contents of the database.
 Then I made some pages wich soon became something like a website.

 I came across a problem: How to pass data from the database (using the
 models) to the pagescontroller.

 I'm almost sure that there has to be a simple way to do that.
 At the moment I used the following as a solution:

 I created a basic page model and copied the pages controller from the
 lib/controllers directory to my own controllers directory. In the
 pages
 controller I made var $uses = array('Package') ... (the model I
 want to
 use) and then $this-set('packages',$this-Package-findAll());

 Now I can use the data from the Package model.

 Is this the way or is there a standard way to do this?Usually the 
PagesController is used only for static content delivery.

That said, you've just created a controller with models tied to a
view... something that everyone should do all the time.

 Another way could be to extend the PagesController, but what name
 should I give it and in what file does that go. That way I can avoid
 copying the pages_controller file.Just create your own PackagesController, 
that already has access to
the Package model.

-- John



--~--~-~--~~~---~--~~
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: passing data from database to pages controller

2007-01-15 Thread nate


Okay, couple things here.  First, scaffolding only works with the
default CRUD actions, not the admin ones.  Second, the $scaffold var
has to be defined in the class itself, you can't set it in an action.
Using scaffold bypasses controller actions completely (however, if you
define controller actions with the same names as scaffold actions, they
will override the scaffold actions).


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



pages controller

2006-12-01 Thread mschwer

Is it possible to get SQL results in the app/views/pages/home.thtml
page?

And if it's possible How to do it.

greetz
Michael


--~--~-~--~~~---~--~~
 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: pages controller

2006-12-01 Thread Darian Anthony Patrick

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

You need to create your own app/controllers/pages_controller.php, and
retrieve (from your model(s)) and pass (to your view, namely home)
data appropriately.

Darian

mschwer wrote:
 Is it possible to get SQL results in the app/views/pages/home.thtml
 page?
 
 And if it's possible How to do it.
 
 greetz
 Michael
 
 
  

- --
Darian Anthony Patrick [EMAIL PROTECTED]
Criticode LLC
http://criticode.com
(215) 240-6566 Office
(866) 789-2992 Facsimile
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFcJJFKpzEXPWA4IcRAmiyAJ9Up277ApFBA0WznWp8iokTHpVDwQCghmsn
LsNfQII3cnh1s/fMTA0vFKo=
=UFCO
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
 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: pages controller

2006-12-01 Thread mschwer

By all means, that i have to build it on my own and therefore to
overwrite the standard pages_controller.

Sorry just started with cakePHP.


--~--~-~--~~~---~--~~
 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: pages controller

2006-12-01 Thread jinhr

Suppose you want to show the latest blog at home page. First you should
finish the independent action getLatestBlog of the Controller
blogs. Then adding following codes in your
app/controllers/pages_controller.php:

$latestBlog= $this-requestAction('/blogs/getLatestBlog',
array('return'));/*call externally*/
$this-set('newBlog', $latestBlog);/*set variable for View*/

Then in your app/views/pages/home.thtml, show it:
   ?php pr($newBlog); ?

Hope it helps. I tested it before posting here. ^O^

Henry

mschwer wrote:
 Is it possible to get SQL results in the app/views/pages/home.thtml
 page?
 
 And if it's possible How to do it.
 
 greetz
 Michael


--~--~-~--~~~---~--~~
 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: pages controller

2006-12-01 Thread jinhr

Don't worry the standard. The app/controllers/pages_controller.php
is for the project named app only. It will effect this project only.

If you want to build another project, say myProjectXXX. You can copy
whole app folder and rename it as myProjectXXX. Then your cake/ can
works for two different projects. This new project has its own
controllers/pages_controller.php.

/workspace
   /app
   /myProjectXXX
   /cake
   /vendors

BTW, I am also a new cake fan. Just for 3 months. Yummy.


--~--~-~--~~~---~--~~
 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: pages controller

2006-12-01 Thread sumanpaul

hi mschwer,

consider reading this -
http://wiki.cakephp.org/tutorials:alternative_installation_locations

by floowing this method u can actually maintain different location for
the app, another for cake which will be same for all projects , and one
for webapps. now the best part is u can actually keep the app folder in
root (/) instead of /public_html or /www/ .or whatever).

regards
suman

On Dec 1, 3:59 pm, mschwer [EMAIL PROTECTED] wrote:
 By all means, that i have to build it on my own and therefore to
 overwrite the standard pages_controller.
 
 Sorry just started with cakePHP.


--~--~-~--~~~---~--~~
 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: pages controller

2006-12-01 Thread Darian Anthony Patrick

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yes, that means you need to build it on your own.  But you aren't
overwriting the standard pages_controller.php, per se.  That is, you
aren't placing your pages_controller.php in the same place on the
filesystem as the standard pages_controller.php.  You are placing yours
in app/controllers/pages_controller.php.  In fact, you can copy the
standard pages_controller.php to that location, and use it as a starting
point.

Darian

mschwer wrote:
 By all means, that i have to build it on my own and therefore to
 overwrite the standard pages_controller.
 
 Sorry just started with cakePHP.
 
 
  

- --
Darian Anthony Patrick [EMAIL PROTECTED]
Criticode LLC
http://criticode.com
(215) 240-6566 Office
(866) 789-2992 Facsimile
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFcKstKpzEXPWA4IcRAjjFAJ9cqYDEcXiqYu2xDChKlNwC8RMTVQCcCQir
Y0EPQCU5hEkAVYIwsQDC+ys=
=bwQ8
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
 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: Pages Controller Subpages

2006-08-04 Thread John Zimmerman [gmail]
Gwoo answered my question on IRC.Here it is for anyone interested (was sort of obvious after he stated it).For static sub pages just create a subdirectory in your /app/views/pages directory.So if I wanted a page with url 
http://example.com/pages/about/companyThe path for that would be /app/views/pages/about/company.thtmlKind of a basic question but hope it helps someone else.
On 8/3/06, John Zimmerman [gmail] [EMAIL PROTECTED] wrote:
In the code for the pages controller there are variables there for subpages.Is anyone using static subpages with the pages controller?I browsed around for documentation about it, but came up empty.




--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---


Pages Controller Subpages

2006-08-03 Thread John Zimmerman [gmail]
In the code for the pages controller there are variables there for subpages.Is anyone using static subpages with the pages controller?I browsed around for documentation about it, but came up empty.

--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---


Re: pages controller and setting a different layout

2006-06-14 Thread [EMAIL PROTECTED]


[EMAIL PROTECTED] ha escrito:

 $this-render(view, layout);

 It is set to autorender by default and layout is set to default by
 default.

 So, you could pass the parameter and either make the parameter the
 exact layout name and just do a test for it not being null to render
 with $layout set.

 function method($page = null, $layout = null)
 {
   ..some code..
   if ($layout != null) {
 $this-render('method', $layout);
   }
 }

yeah thanks Troy, I got this by doing a similar thing myself in the
end. 

Luke


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



pages controller and setting a different layout

2006-06-13 Thread [EMAIL PROTECTED]

Hi

I searched on Groups and asked to no avail on IRC. So now asking here!

I have a bunch of static pages for my app, so am very happy using the
pages controller to display these, it works well. But for some pages I
needed to set a diff layout. I couldnt easily see how to extend
PagesController as it seems to have little helper pieces of code, so I
adjusted its code to check if $page - passed by Route - was to havea
diff layout set.

This means for each non standard page I now have to put a linein my
routes config file.

But I was wonderingif there was a easier way for to have a diff. layout
set for a pages - based on a parameter pass or similar?

I am pretty new to this version of cake, although I did try it ages
ago, so I'm sure I am missing something. 

thanks

regards 

Luke


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---