Re: I eliminated the default pages routing and now my controllers won't load

2009-05-12 Thread Dr. Loboto

This is complete example. Value from :controller will be used by
Cake as controller name and value from :action as action name.

On May 11, 7:44 pm, Bankai hgnelso...@gmail.com wrote:
 Loboto, and how do I indicate action in the URL?

 For example, I have a controller named Contact.

 Router::connect('/:controller/:action/*');

 Am I suppose to replace the above line to my Contact controller?

 On 12 mayo, 04:01, Dr. Loboto drlob...@gmail.com wrote:

  You can try this routes set:

  Router::connect('/:controller/:action/*');
  Router::connect('/', array('controller' = 'pages', 'action' =
  'display', 'home'));
  Router::connect('/(.*)', array('controller' = 'pages', 'action' =
  'display'));

  Controllers index actions won't work still, you always need to
  indicate action in URL.

  On May 11, 12:21 am, Bankai hgnelso...@gmail.com wrote:

   I wanted my URLs to look like:www.website.com/some_content

   Instead of the cakephp default:www.website.com/pages/some_content

   So I edited the router.php to this

   Router::connect('/', array('controller' = 'pages', 'action' =
   'display', 'home'));
   #Router::connect('/pages/*', array('controller' = 'pages', 'action'
   = 'display'));
   Router::connect('/(.*)', array('controller' = 'pages', 'action' =
   'display'));

   But now my controllers are not loading. It's asking for views instead.
   Also, when I type:

   ?php e($html-link('Somelink', 'somelink')); ?
   It still puts /pages in the url. How do I get rid of it?
--~--~-~--~~~---~--~~
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: I eliminated the default pages routing and now my controllers won't load

2009-05-11 Thread Dr. Loboto

You can try this routes set:

Router::connect('/:controller/:action/*');
Router::connect('/', array('controller' = 'pages', 'action' =
'display', 'home'));
Router::connect('/(.*)', array('controller' = 'pages', 'action' =
'display'));

Controllers index actions won't work still, you always need to
indicate action in URL.

On May 11, 12:21 am, Bankai hgnelso...@gmail.com wrote:
 I wanted my URLs to look like:www.website.com/some_content

 Instead of the cakephp default:www.website.com/pages/some_content

 So I edited the router.php to this

 Router::connect('/', array('controller' = 'pages', 'action' =
 'display', 'home'));
 #Router::connect('/pages/*', array('controller' = 'pages', 'action'
 = 'display'));
 Router::connect('/(.*)', array('controller' = 'pages', 'action' =
 'display'));

 But now my controllers are not loading. It's asking for views instead.
 Also, when I type:

 ?php e($html-link('Somelink', 'somelink')); ?
 It still puts /pages in the url. How do I get rid of it?
--~--~-~--~~~---~--~~
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: I eliminated the default pages routing and now my controllers won't load

2009-05-11 Thread Bankai

Loboto, and how do I indicate action in the URL?

For example, I have a controller named Contact.

Router::connect('/:controller/:action/*');

Am I suppose to replace the above line to my Contact controller?

On 12 mayo, 04:01, Dr. Loboto drlob...@gmail.com wrote:
 You can try this routes set:

 Router::connect('/:controller/:action/*');
 Router::connect('/', array('controller' = 'pages', 'action' =
 'display', 'home'));
 Router::connect('/(.*)', array('controller' = 'pages', 'action' =
 'display'));

 Controllers index actions won't work still, you always need to
 indicate action in URL.

 On May 11, 12:21 am, Bankai hgnelso...@gmail.com wrote:

  I wanted my URLs to look like:www.website.com/some_content

  Instead of the cakephp default:www.website.com/pages/some_content

  So I edited the router.php to this

  Router::connect('/', array('controller' = 'pages', 'action' =
  'display', 'home'));
  #Router::connect('/pages/*', array('controller' = 'pages', 'action'
  = 'display'));
  Router::connect('/(.*)', array('controller' = 'pages', 'action' =
  'display'));

  But now my controllers are not loading. It's asking for views instead.
  Also, when I type:

  ?php e($html-link('Somelink', 'somelink')); ?
  It still puts /pages in the url. How do I get rid of it?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



I eliminated the default pages routing and now my controllers won't load

2009-05-10 Thread Bankai

I wanted my URLs to look like:
www.website.com/some_content

Instead of the cakephp default:
www.website.com/pages/some_content

So I edited the router.php to this

Router::connect('/', array('controller' = 'pages', 'action' =
'display', 'home'));
#Router::connect('/pages/*', array('controller' = 'pages', 'action'
= 'display'));
Router::connect('/(.*)', array('controller' = 'pages', 'action' =
'display'));

But now my controllers are not loading. It's asking for views instead.
Also, when I type:

?php e($html-link('Somelink', 'somelink')); ?
It still puts /pages in the url. How do I get rid of it?
--~--~-~--~~~---~--~~
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: I eliminated the default pages routing and now my controllers won't load

2009-05-10 Thread JamesF

make sure when usings reverse routing to use verbose linking...ie you
have to link like this

echo $html-link('link text', array('controller'='your_controller',
'action'='your_action'));


On May 10, 1:21 pm, Bankai hgnelso...@gmail.com wrote:
 I wanted my URLs to look like:www.website.com/some_content

 Instead of the cakephp default:www.website.com/pages/some_content

 So I edited the router.php to this

 Router::connect('/', array('controller' = 'pages', 'action' =
 'display', 'home'));
 #Router::connect('/pages/*', array('controller' = 'pages', 'action'
 = 'display'));
 Router::connect('/(.*)', array('controller' = 'pages', 'action' =
 'display'));

 But now my controllers are not loading. It's asking for views instead.
 Also, when I type:

 ?php e($html-link('Somelink', 'somelink')); ?
 It still puts /pages in the url. How do I get rid of it?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---