Re: Pages and Auth

2012-07-09 Thread David Lozzi
Fantastic!

Only thing better than CakePHP is the community! Thank you so much!

-- 
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: Pages and Auth

2012-07-08 Thread tigr
Hi!

I am also falling in love with it, so far as to become jealous already :)

The authentication is what you did at your users pages. The authentication 
and authorization are different. Now you have to set up the authorization 
using some method, like controller/action authorization for example. And 
then during the check you redirect users to login if they are not yet 
logged in. But this has to be set up.

If you want it simple, you add something like this to your app controller;
public $components = array(
'Auth' => array(
'loginAction' => array(
'controller' => 'users',
'action' => 'login',
),
'loginRedirect' => array(
'controller' => 'users',
'action' => 'view',
),
   );
And it will automatically redirect users to users/login if they are not 
logged in.
Then you use $this->Auth->allow() and $this->Auth->deny() in your 
controllers to control what methods are available to anonymous users.

There are other alternatives but this is the most basic setup, I think.
Cheers!

On Saturday, 7 July 2012 23:20:59 UTC+2, David Lozzi wrote:
>
> Hi there,
>
> I'm new to CakePHP, and falling in love it with. A question on how this 
> all works. 
>
> I have setup a route for admin, so domain/admin/news, and 
> domain/admin/users work.
>
> I have added authentication using the CakePHP tutorial, but it's added to 
> a single controller, my users. I want it applied to all items under admin. 
> Is it possible to set this up, so whatever in admin requires auth, and goes 
> to a shared login page?
>
>

-- 
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: "Pages" database table

2010-09-27 Thread lado77
Hi LipeDjow,

thanks for your advice and example, that sounds like most suitable
solution (also suggestion of j.blotus) in such situations.

Ladislav

On Sep 25, 9:33 pm, Felipe Tadeu  wrote:
> Hi Ladislav,
>
> I had a similar problem, but in my case the table was called 'files'.
> My simple solution was to keep the table name, and change the name at
> application.
> i.e: table name as 'pages' and controller/model names as
> BookPagesController/BookPage (following the suggestion of j.blotus).
>
> At the model just need to set $useTable = 'pages'.
>
> class BookPage extends AppModel {
>
>     var $name = 'BookPage';
>     var $useTable = 'pages';
>
> }
>
> I don't like the idea to refactor the pages controller just to satisfy
> one module name.
>
> Hope that helps. =)
>
> PS: sorry for my bad english.
>
> LipeDjow
>
> On 24 set, 17:51, lado77  wrote:
>
>
>
> > Dear Cake Bakers,
>
> > In my app (currently being designed) I want to have "pages" database
> > table, simply because it is the most suitable name for it (Page
> > belongsTo Book, Book hasMany Pages). But this is of course in conflict
> > with Cake's default static content serving with its PagesController. I
> > really don't want to mix database entity "Page" with static content
> > "Page" into the common "PageController" as these 2 are totally
> > different things. So I see 2 possible solutions here. One would be to
> > rename(refactor) cake's PagesControler to something like
> > StaticController and all occurrences in URL from /pages/ to /static/.
> > But this seems to me quite stupid e.g. regarding future Cake's release
> > updates. Another solution would be to rename "Pages" table to
> > something different. But I don't like to complicate obvious and easy
> > things such as clear naming conventions. My question is: Have anybody
> > had experiences with such situation and what was your solution?
>
> > Ladislav

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: "Pages" database table

2010-09-27 Thread Felipe Tadeu
Hi Ladislav,

I had a similar problem, but in my case the table was called 'files'.
My simple solution was to keep the table name, and change the name at
application.
i.e: table name as 'pages' and controller/model names as
BookPagesController/BookPage (following the suggestion of j.blotus).

At the model just need to set $useTable = 'pages'.

class BookPage extends AppModel {

var $name = 'BookPage';
var $useTable = 'pages';

}

I don't like the idea to refactor the pages controller just to satisfy
one module name.

Hope that helps. =)

PS: sorry for my bad english.

LipeDjow

On 24 set, 17:51, lado77  wrote:
> Dear Cake Bakers,
>
> In my app (currently being designed) I want to have "pages" database
> table, simply because it is the most suitable name for it (Page
> belongsTo Book, Book hasMany Pages). But this is of course in conflict
> with Cake's default static content serving with its PagesController. I
> really don't want to mix database entity "Page" with static content
> "Page" into the common "PageController" as these 2 are totally
> different things. So I see 2 possible solutions here. One would be to
> rename(refactor) cake's PagesControler to something like
> StaticController and all occurrences in URL from /pages/ to /static/.
> But this seems to me quite stupid e.g. regarding future Cake's release
> updates. Another solution would be to rename "Pages" table to
> something different. But I don't like to complicate obvious and easy
> things such as clear naming conventions. My question is: Have anybody
> had experiences with such situation and what was your solution?
>
> Ladislav

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: "Pages" database table

2010-09-25 Thread cricket
On Fri, Sep 24, 2010 at 4:51 PM, lado77  wrote:
> Dear Cake Bakers,
>
> In my app (currently being designed) I want to have "pages" database
> table, simply because it is the most suitable name for it (Page
> belongsTo Book, Book hasMany Pages). But this is of course in conflict
> with Cake's default static content serving with its PagesController. I
> really don't want to mix database entity "Page" with static content
> "Page" into the common "PageController" as these 2 are totally
> different things. So I see 2 possible solutions here. One would be to
> rename(refactor) cake's PagesControler to something like
> StaticController and all occurrences in URL from /pages/ to /static/.
> But this seems to me quite stupid e.g. regarding future Cake's release
> updates. Another solution would be to rename "Pages" table to
> something different. But I don't like to complicate obvious and easy
> things such as clear naming conventions. My question is: Have anybody
> had experiences with such situation and what was your solution?

You could always name your model Content instead.

However, what I've done is create my own PagesController and use
display() for DB content. For static pages, I use displayStatic(),
which is identical to the default display() except that I add
$this->viewPath = 'pages/static'; before the call to render(). All
static pages have a route. I figure that, if I've got static pages I'm
unlikely to be changing them often, so creating a route for each isn't
a big deal.

For the DB content, I put the following in bootstrap.php:

$slugs = Cache::read('Pages_slugs');

if (empty($slugs))
{
App::import('Model', 'Page');
$page = new Page();
$slugs = $page->find(
'list',
array(
  'fields' => array('Page.slug'),
  'order' => 'Page.slug DESC'
 )
);
Cache::write('Pages_slugs', $slugs);
}
Configure::write('Pages_slugs', $slugs);

Then, at the end of routes.php:

Router::connect(
'/:slug',
array(
'controller' => 'pages',
'action' => 'display'
),
array(
'slug' => implode(Configure::read('Pages_slugs'), '|'),
'pass' => array('slug')
)
);

Just remember to delete the cached list of slugs if a page is added or removed.

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: "Pages" database table

2010-09-25 Thread Jeremy Burns | Class Outfit
I also wonder what the real impact would be of just creating your own pages 
controller? I always cut my own anyway and there is nothing to stop you 
creating your own actions in it. It might be worth just giving it a go - create 
a model and a view in the pages folder and see what happens. You could always 
retain the 'default' display action anyway and change the routing to avoid 
conflicts if really necessary.

I could be talking out of my backside and it all might fall down in a horrible 
heap, but if it were me I'd try it.

Jeremy Burns
Class Outfit

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

On 25 Sep 2010, at 16:31, j.blotus wrote:

> Couldn't you just name it BookPages?
> 
> On Sep 24, 4:51 pm, lado77  wrote:
>> Dear Cake Bakers,
>> 
>> In my app (currently being designed) I want to have "pages" database
>> table, simply because it is the most suitable name for it (Page
>> belongsTo Book, Book hasMany Pages). But this is of course in conflict
>> with Cake's default static content serving with its PagesController. I
>> really don't want to mix database entity "Page" with static content
>> "Page" into the common "PageController" as these 2 are totally
>> different things. So I see 2 possible solutions here. One would be to
>> rename(refactor) cake's PagesControler to something like
>> StaticController and all occurrences in URL from /pages/ to /static/.
>> But this seems to me quite stupid e.g. regarding future Cake's release
>> updates. Another solution would be to rename "Pages" table to
>> something different. But I don't like to complicate obvious and easy
>> things such as clear naming conventions. My question is: Have anybody
>> had experiences with such situation and what was your solution?
>> 
>> Ladislav
> 
> 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: "Pages" database table

2010-09-25 Thread j.blotus
Couldn't you just name it BookPages?

On Sep 24, 4:51 pm, lado77  wrote:
> Dear Cake Bakers,
>
> In my app (currently being designed) I want to have "pages" database
> table, simply because it is the most suitable name for it (Page
> belongsTo Book, Book hasMany Pages). But this is of course in conflict
> with Cake's default static content serving with its PagesController. I
> really don't want to mix database entity "Page" with static content
> "Page" into the common "PageController" as these 2 are totally
> different things. So I see 2 possible solutions here. One would be to
> rename(refactor) cake's PagesControler to something like
> StaticController and all occurrences in URL from /pages/ to /static/.
> But this seems to me quite stupid e.g. regarding future Cake's release
> updates. Another solution would be to rename "Pages" table to
> something different. But I don't like to complicate obvious and easy
> things such as clear naming conventions. My question is: Have anybody
> had experiences with such situation and what was your solution?
>
> Ladislav

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: pages not diplayed

2009-08-24 Thread brian

Check Apache's logs if you can access them. Check Cake's error log.
Set debug = 2.

On Sun, Aug 23, 2009 at 5:24 AM, xxbeta wrote:
>
> My project is working properly on my local server, apache on windows
> xp. However, after uploading all the files onto the hosting server,
> some pages just can not be displayed.Only returns a blank page in the
> web browser, both IE and Firefox. The hosting server should be linux.
> Need advice.
>
> Thanks advance.
>
> >
>

--~--~-~--~~~---~--~~
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: pages not diplayed

2009-08-23 Thread Onezino HEAT
the server need change some files of apache conf.
http://book.cakephp.org/view/27/Developing-with-CakePHP

2009/8/23 xxbeta 

>
> My project is working properly on my local server, apache on windows
> xp. However, after uploading all the files onto the hosting server,
> some pages just can not be displayed.Only returns a blank page in the
> web browser, both IE and Firefox. The hosting server should be linux.
> Need advice.
>
> Thanks advance.
>
> >
>

--~--~-~--~~~---~--~~
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: Pages and Views

2009-02-24 Thread Mike

Yes,

it makes sense, and it works...

Thx

On 24 fév, 15:39, Adam Royle  wrote:
> I think you're on the right track with your thinking.
>
> 1) You should route to your "users" controller, not the pages controller
>
> Router::connect('/search', array('controller' =>  'users', 'action' =>  
> 'search'));
>
> 2) You should explicitly set your search form url.
>
> echo $form->create('User',array('url' =>  '/search'));
>
> 3) Then inside your "users" controller, you'll have a "search" method
> that looks at $this->data['User']['search'] for the search string.
>
> Make sense?
>
> Adam
>
> Mike wrote:
> > Hi everyone,
>
> > I'd like to manage my users search functionality on a page called
> > search, then the end users will be able to access it using the url
> >www.mywebsite.com/search.
>
> > Actually, i already created a search.ctp element with just a form to
> > process the search on the user table here is the code :
>
> > //Search Box
> > echo $form->create('User',array('action' =>  'search'));
> > echo $form->input('search', array('label' =>  __('search',true), 'type'
> > =>  'text'));
> > echo $form->submit(__('search',true));
>
> > The search function is in the search method in the User controller
> > class, which means the results of the search should actually be
> > managed in a search view in views/users/search.ctp.
>
> > I created a file at this location views/pages/search.ctp and in
> > routes.php file I have the following connection :
> > Router::connect('/search', array('controller' =>  'pages', 'action' =>
> > 'display', 'search'));
> > Which means this file is accessible fromwww.mywebsite.com/search
>
> > I'd like the user search to be managed on this file, then the end
> > users when performing a search will be redirected to view the results
> > under a url like thiswww.mywebsite.com/search, including the search
> > element define before, not a url likewww.mywebsite.com/users/search
>
> > Is there a way to manage this ? maybe a redirection but I'm completely
> > stuck at this point.
>
> > Thx,
--~--~-~--~~~---~--~~
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: Pages and Views

2009-02-23 Thread Adam Royle

I think you're on the right track with your thinking.

1) You should route to your "users" controller, not the pages controller

Router::connect('/search', array('controller' =>  'users', 'action' =>  
'search'));

2) You should explicitly set your search form url.

echo $form->create('User',array('url' =>  '/search'));

3) Then inside your "users" controller, you'll have a "search" method 
that looks at $this->data['User']['search'] for the search string.

Make sense?

Adam

Mike wrote:
> Hi everyone,
>
> I'd like to manage my users search functionality on a page called
> search, then the end users will be able to access it using the url
> www.mywebsite.com/search.
>
> Actually, i already created a search.ctp element with just a form to
> process the search on the user table here is the code :
>
> //Search Box
> echo $form->create('User',array('action' =>  'search'));
> echo $form->input('search', array('label' =>  __('search',true), 'type'
> =>  'text'));
> echo $form->submit(__('search',true));
>
> The search function is in the search method in the User controller
> class, which means the results of the search should actually be
> managed in a search view in views/users/search.ctp.
>
> I created a file at this location views/pages/search.ctp and in
> routes.php file I have the following connection :
> Router::connect('/search', array('controller' =>  'pages', 'action' =>
> 'display', 'search'));
> Which means this file is accessible from www.mywebsite.com/search
>
> I'd like the user search to be managed on this file, then the end
> users when performing a search will be redirected to view the results
> under a url like this www.mywebsite.com/search, including the search
> element define before, not a url like www.mywebsite.com/users/search
>
> Is there a way to manage this ? maybe a redirection but I'm completely
> stuck at this point.
>
> Thx,
> >
>
>

--~--~-~--~~~---~--~~
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: Pages without the "pages" in the URL

2008-05-05 Thread b logica

If you have pages in a subdirectory you can also use a wildcard to
avoid having to list a route for each one:

Router::connect('/about', array('controller' => 'pages', 'action' =>
'display', 'about/index'));
Router::connect('/about/*', array('controller' => 'pages', 'action' =>
'display', 'about'));


On Mon, May 5, 2008 at 10:42 AM, basstech <[EMAIL PROTECTED]> wrote:
>
>  Thank you, that's what I was looking for.
>
>  On May 5, 4:01 am, "[EMAIL PROTECTED]"
>
>
> <[EMAIL PROTECTED]> wrote:
>  > The easiest way is to add some extra routes in the app/config/
>  > routes.php
>  >
>  > In cake 1.2:
>  > Router::connect('/about', array('controller' => 'pages', 'action' =>
>  > 'display', 'about'));
>  >
>  > In cake 1.1
>  > $Route->connect('/about', array('controller' => 'pages', 'action' =>
>  > 'display', 'about'));
>  >
>  > On May 5, 7:03 am, basstech <[EMAIL PROTECTED]> wrote:
>  >
>  > > Is there an easy way to configure my CakePHP app to construct URLs
>  > > without the "pages/" part in it?
>  >
>  > > For example, if I use the HtmlHelper like so:
>  >
>  > > $html->link('About Me', 'about', null, false, false);
>  >
>  > > Right now, CakePHP constructs the URL "http://domain.name/pages/
>  > > about/". I would like this behavior to instead construct the URL
>  > > "http://domain.name/about/";. Is there an easy way to do accomplish
>  > > this?
>  >
>  > > I know that there is a workaround to this by making an "AboutModel"
>  > > and "AboutController" that could respond to this, however I would like
>  > > to use the built in PagesController functionality rather than write a
>  > > new MVC for each page.
>  >
>  > > Thanks
>  > > CJ
>  >
>

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



Re: Pages without the "pages" in the URL

2008-05-05 Thread basstech

Thank you, that's what I was looking for.

On May 5, 4:01 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> The easiest way is to add some extra routes in the app/config/
> routes.php
>
> In cake 1.2:
> Router::connect('/about', array('controller' => 'pages', 'action' =>
> 'display', 'about'));
>
> In cake 1.1
> $Route->connect('/about', array('controller' => 'pages', 'action' =>
> 'display', 'about'));
>
> On May 5, 7:03 am, basstech <[EMAIL PROTECTED]> wrote:
>
> > Is there an easy way to configure my CakePHP app to construct URLs
> > without the "pages/" part in it?
>
> > For example, if I use the HtmlHelper like so:
>
> > $html->link('About Me', 'about', null, false, false);
>
> > Right now, CakePHP constructs the URL "http://domain.name/pages/
> > about/". I would like this behavior to instead construct the URL
> > "http://domain.name/about/";. Is there an easy way to do accomplish
> > this?
>
> > I know that there is a workaround to this by making an "AboutModel"
> > and "AboutController" that could respond to this, however I would like
> > to use the built in PagesController functionality rather than write a
> > new MVC for each page.
>
> > Thanks
> > CJ
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Pages without the "pages" in the URL

2008-05-05 Thread Andreas

Hi,
an easy way would be to go to your app/config/routes.php and add a
rule like:

Router::connect('/about', array('controller' => 'pages', 'action' =>
'about'));

(This is code for cake 1.2, in the stable release it's something like
$route->connect() i guess).

And in the helper: $html->link('...', '/about');


Andreas

On 5 Mai, 07:03, basstech <[EMAIL PROTECTED]> wrote:
> Is there an easy way to configure my CakePHP app to construct URLs
> without the "pages/" part in it?
>
> For example, if I use the HtmlHelper like so:
>
> $html->link('About Me', 'about', null, false, false);
>
> Right now, CakePHP constructs the URL "http://domain.name/pages/
> about/". I would like this behavior to instead construct the URL
> "http://domain.name/about/";. Is there an easy way to do accomplish
> this?
>
> I know that there is a workaround to this by making an "AboutModel"
> and "AboutController" that could respond to this, however I would like
> to use the built in PagesController functionality rather than write a
> new MVC for each page.
>
> Thanks
> CJ

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



Re: Pages without the "pages" in the URL

2008-05-05 Thread [EMAIL PROTECTED]

The easiest way is to add some extra routes in the app/config/
routes.php

In cake 1.2:
Router::connect('/about', array('controller' => 'pages', 'action' =>
'display', 'about'));

In cake 1.1
$Route->connect('/about', array('controller' => 'pages', 'action' =>
'display', 'about'));

On May 5, 7:03 am, basstech <[EMAIL PROTECTED]> wrote:
> Is there an easy way to configure my CakePHP app to construct URLs
> without the "pages/" part in it?
>
> For example, if I use the HtmlHelper like so:
>
> $html->link('About Me', 'about', null, false, false);
>
> Right now, CakePHP constructs the URL "http://domain.name/pages/
> about/". I would like this behavior to instead construct the URL
> "http://domain.name/about/";. Is there an easy way to do accomplish
> this?
>
> I know that there is a workaround to this by making an "AboutModel"
> and "AboutController" that could respond to this, however I would like
> to use the built in PagesController functionality rather than write a
> new MVC for each page.
>
> Thanks
> CJ
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Pages without the "pages" in the URL

2008-05-05 Thread Adam Royle

$html->link('About Me', '/about');

On May 5, 3:03 pm, basstech <[EMAIL PROTECTED]> wrote:
> Is there an easy way to configure my CakePHP app to construct URLs
> without the "pages/" part in it?
>
> For example, if I use the HtmlHelper like so:
>
> $html->link('About Me', 'about', null, false, false);
>
> Right now, CakePHP constructs the URL "http://domain.name/pages/
> about/". I would like this behavior to instead construct the URL
> "http://domain.name/about/";. Is there an easy way to do accomplish
> this?
>
> I know that there is a workaround to this by making an "AboutModel"
> and "AboutController" that could respond to this, however I would like
> to use the built in PagesController functionality rather than write a
> new MVC for each page.
>
> Thanks
> CJ
--~--~-~--~~~---~--~~
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 [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
>
>  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

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



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 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 not rendering

2007-09-15 Thread Matt

Thanks Adam,

I orignally had the debug level at 2 as I was doing development. Then
I turned it to 0 because I thought the debug might be causing the page
to time out. After that I changed it to 3 to see if it would work then
but still no luck.

The page shows up with an HTML header and footer but it is not the
header from my layout.

I know for sure it is the session as when I use the write function on
the home page it goes blank or when I go to a page that uses it it
goes blank.

Any help again would be blank.


On Sep 15, 4:53 pm, "Adam Royle" <[EMAIL PROTECTED]> wrote:
> Hi Matt,
>
> This usually indicates that there is a script error and cakephp's error
> handling under mode DEBUG = 0 prevents the page from displaying. Set DEBUG
> in app/config/core.php to be higher than 0 (eg 2), and you will see any
> errors that are occurring.
>
> Adam
>
>
>
> - Original Message -
> From: "Matt" <[EMAIL PROTECTED]>
> To: "Cake PHP" 
> Sent: Sunday, September 16, 2007 6:24 AM
> Subject: Re: Pages not rendering
>
> > Okay, I have now ruled this down to one function $this->Session-
> >>write('User', "test")
>
> > I have tried using the database, php and cake session types but all of
> > them give the same result. As soon as I call the write function
> > everything page is displayed as blank.
>
> > Am I missing something with the session component. I'm using cake
> > 1.1.16.5421
>
> > Any help would be greatly appreciated.
>
> > On Sep 12, 11:59 pm, Matt <[EMAIL PROTECTED]> wrote:
> >> I was just doing so work on my site and it seems that some of the
> >> pages are rendering but most are not. It is very variable.
>
> >> For example, the homepage renders fine but then I go to login and when
> >> I go to /users/login I just get a blank page. or if I go to users/ I
> >> get blank page.  Also if I go to groups/ or articles/ all models I
> >> have implemented I get a blank page.
>
> >> I did check the server error log and saw some memory error but that
> >> was just one error. I tried reverting all my changes back to an old
> >> backup but it doesn't seem to work even then. I'm on dreamhost's
> >> servers.
>
> >> Has anyone else had this type of problem?
>
> >> TIA- Hide quoted text -
>
> - Show quoted text -


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

2007-09-15 Thread Adam Royle

Hi Matt,

This usually indicates that there is a script error and cakephp's error 
handling under mode DEBUG = 0 prevents the page from displaying. Set DEBUG 
in app/config/core.php to be higher than 0 (eg 2), and you will see any 
errors that are occurring.

Adam

- Original Message - 
From: "Matt" <[EMAIL PROTECTED]>
To: "Cake PHP" 
Sent: Sunday, September 16, 2007 6:24 AM
Subject: Re: Pages not rendering


>
> Okay, I have now ruled this down to one function $this->Session-
>>write('User', "test")
>
> I have tried using the database, php and cake session types but all of
> them give the same result. As soon as I call the write function
> everything page is displayed as blank.
>
> Am I missing something with the session component. I'm using cake
> 1.1.16.5421
>
> Any help would be greatly appreciated.
>
>
>
> On Sep 12, 11:59 pm, Matt <[EMAIL PROTECTED]> wrote:
>> I was just doing so work on my site and it seems that some of the
>> pages are rendering but most are not. It is very variable.
>>
>> For example, the homepage renders fine but then I go to login and when
>> I go to /users/login I just get a blank page. or if I go to users/ I
>> get blank page.  Also if I go to groups/ or articles/ all models I
>> have implemented I get a blank page.
>>
>> I did check the server error log and saw some memory error but that
>> was just one error. I tried reverting all my changes back to an old
>> backup but it doesn't seem to work even then. I'm on dreamhost's
>> servers.
>>
>> Has anyone else had this type of problem?
>>
>> TIA
>
>
> >
>
> 


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

2007-09-15 Thread Matt

Okay, I have now ruled this down to one function $this->Session-
>write('User', "test")

I have tried using the database, php and cake session types but all of
them give the same result. As soon as I call the write function
everything page is displayed as blank.

Am I missing something with the session component. I'm using cake
1.1.16.5421

Any help would be greatly appreciated.



On Sep 12, 11:59 pm, Matt <[EMAIL PROTECTED]> wrote:
> I was just doing so work on my site and it seems that some of the
> pages are rendering but most are not. It is very variable.
>
> For example, the homepage renders fine but then I go to login and when
> I go to /users/login I just get a blank page. or if I go to users/ I
> get blank page.  Also if I go to groups/ or articles/ all models I
> have implemented I get a blank page.
>
> I did check the server error log and saw some memory error but that
> was just one error. I tried reverting all my changes back to an old
> backup but it doesn't seem to work even then. I'm on dreamhost's
> servers.
>
> Has anyone else had this type of problem?
>
> TIA


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

2007-07-15 Thread [EMAIL PROTECTED]

I think this should work:


class Page extends AppModel
{
   var $hasMany =
array( 'ChildPages'=>array('className'=>'Page','foreignKey'=>'parend_id'));
  var $belongsTo = array('ParentPage'=>array('className'=>'Page',
'foreignKey'=>'parent_id'));
}


Don't forget to use recursive option, unbindModel or 'expects' :)

On 14, 15:22, poncjusz <[EMAIL PROTECTED]> wrote:
> What is the best way to organize Pages on our site? I'm thinking about
> relation between parent pages and their 'child' both contain the same
> information such as their name body and author, but some of them are
> children and some are parents. I think that the best way will be to
> use parent_id field (0 for parent). But I'm not sure is making hasMany
> to this same model is correct or I shoud use HABTM (with pages_pages
> table?). I would like to know how you do it in your applications?


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



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


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



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

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

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 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: Re: Pages indexed by Google with CAKE_SESSION_COOKIE parameter on querystring

2006-09-14 Thread Samuel DeVore

I have found that sometimes the session id can show up in the urls
when there is a trailing eol (end of line char) in a helper or
component

Sam D

On 9/14/06, nate <[EMAIL PROTECTED]> wrote:
>
> In order to completely disable it, I put the following in my
> app/config/bootstrap.php (note that you can also make the corresponding
> changes in php.ini):
>
> ini_set('session.use_trans_sid', 0);
> ini_set('url_rewriter.tags', '');
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~-~--~~~---~--~~
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 indexed by Google with CAKE_SESSION_COOKIE parameter on querystring

2006-09-14 Thread nate

In order to completely disable it, I put the following in my
app/config/bootstrap.php (note that you can also make the corresponding
changes in php.ini):

ini_set('session.use_trans_sid', 0);
ini_set('url_rewriter.tags', '');


--~--~-~--~~~---~--~~
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 indexed by Google with CAKE_SESSION_COOKIE parameter on querystring

2006-09-14 Thread [EMAIL PROTECTED]

This is a PHP setting not a Cake setting.  It is one that when sessions
can't do cookies it attaches as part of the URL.


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

2006-08-24 Thread gRegor

Simplerules:

Check in /app/config/routes.php and make sure you have this route (it
should be in there by default):

$Route->connect('/pages/*', array('controller' => 'pages', 'action' =>
'display'));


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

2006-08-24 Thread Mikee Freedom

Sorry dood, I haven't played with this enough to tell you anything
more useful. I'm sure it has come up in the Google Groups before
though if you did a quick search.

On 25/08/06, Simplerules <[EMAIL PROTECTED]> wrote:
>
> I created page1.thtml in the views/pages but got this errror when I try
> to view pages/page1
>
> Missing Method in PagesController
>
> You are seeing this error because the action page1 is not defined in
> controller PagesController
>
> Notice: this error is being rendered by the
> app/views/errors/missing_action.thtml view file, a user-customizable
> error page for handling invalid action dispatches.
>
> Fatal: Create Method:
>
>  class PagesController extends AppController
> {
> function page1()
> {
>
> }
> }
> ?>
>
> in file : app\controllers\pages_controller.php
>
> Error: Unable to execute action page1 in PagesController
>
>
> >
>

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

2006-08-24 Thread Simplerules

I created page1.thtml in the views/pages but got this errror when I try
to view pages/page1

Missing Method in PagesController

You are seeing this error because the action page1 is not defined in
controller PagesController

Notice: this error is being rendered by the
app/views/errors/missing_action.thtml view file, a user-customizable
error page for handling invalid action dispatches.

Fatal: Create Method:



in file : app\controllers\pages_controller.php

Error: Unable to execute action page1 in PagesController


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

2006-08-24 Thread Mikee Freedom

Cake comes with an inbuilt Pages Controller: PagesController.

Allows you to define static pages within that pages directory and
serve them up similar to the way you do actions.

http://groups.google.com/group/cake-php/search?group=cake-php&q=pagescontroller&qt_g=1&searchnow=Search+this+group
http://api.cakephp.org/class_pages_controller.html

easy way to serve static content.


On 25/08/06, Simplerules <[EMAIL PROTECTED]> wrote:
>
> What purpose does the pages folder in views serve?
>
>
> >
>

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


Re: Pages / CMS / Routing Idea (looking for some feedback)

2006-07-27 Thread Jon Bennett

On 7/27/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
> Here is what I am currently thinking about doing (maybe someone has already
> done it or tried).  I am just looking for some feedback on this.
>
> So the ultimate goal is to get rid of the "pages" or "posts" part of the url
> http://example.com/pages/home, without having to specify a new route
> definition for every page.
>
> So instead of http://example.com/pages/home it would be
> http://example.com/home.
>
> So my idea is to have the following happen when a page is loaded (ignoring
> plugins and route definitions in this example)
>
>
> Cake checks for a controller named 'home'
> If controller does not exists it tries to use the default action in a
> specified controller (like the pages controller) instead of displaying the
> controller does not exist error. This way I can have the following
>
> /products <--which is a controller
>
> /home <-- which is not a controller
>
> and /home will be passed as a parameter to a controller I have called
> 'cms_controller' for display instead of using something like /cms/home.
>
> Anyone done this already?
>
> Anyone have any ideas on whether this is possible to implement in
> routes.php, bootstrap.php, or app_controller.php?
>

sounds vaguely similar to something I've been wondering about, Nate
came up with a nice solution:

http://tinyurl.com/mofuq

hth

jon
-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

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



Re: pages controller and setting a different layout

2006-06-13 Thread [EMAIL PROTECTED]

$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);
  }
}


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