Re: Moving /pages/ to /

2006-06-14 Thread JohnRobert

Thanks guys! I'll give this a try when i get a bit of free time.

Great blog too Felix! I did have a look on there yesterday, but
couldn't find that post!


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



Moving /pages/ to /

2006-06-13 Thread JohnRobert

Before I begin, I'm quite new to cake php (about 2 days using it). So
far so good!

Before I can fully commit, I need to be able to create static pages
under / rather than only under /pages/. I had a go at changing some
routes, to no avail!

Before we continue, I'd also like to note I want /news/ /edit/ etc.. to
behave in the default manner, i.e - running their equvilent controller
and doing what they'ed do on a fresh install, so / isn't *only* a place
for static pages, but also a few controllers of my choosing.

I'd imagine this requires defining each controller in the routes
config, I'm just not too sure how to do it, I found the manual a bit
confusing.


--~--~-~--~~~---~--~~
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: Moving /pages/ to /

2006-06-13 Thread Felix Geisendörfer




I think I've already created what you are looking for. Good luck with
it ; ):

http://www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/

I only use it on my webdesign page (see below), but it seems to work
pretty well so far.

Best Regards,
Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de



JohnRobert schrieb:

  Before I begin, I'm quite new to cake php (about 2 days using it). So
far so good!

Before I can fully commit, I need to be able to create static pages
under / rather than only under /pages/. I had a go at changing some
routes, to no avail!

Before we continue, I'd also like to note I want /news/ /edit/ etc.. to
behave in the default manner, i.e - running their equvilent controller
and doing what they'ed do on a fresh install, so / isn't *only* a place
for static pages, but also a few controllers of my choosing.

I'd imagine this requires defining each controller in the routes
config, I'm just not too sure how to do it, I found the manual a bit
confusing.




  


--~--~-~--~~~---~--~~
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: Moving /pages/ to /

2006-06-13 Thread tjquoll

That's pretty cool. I've been playing with a similar idea in a cms I'm
building for our main business site. I've been searching the code
looking for an alternative to doing the  foreach
($paths-controllerPaths as $path) trick to get the controller names
but haven't found any otherway yet.

To Cakeify small legacy html sites I've been doing something like

if(preg_match(/^(.*)\.html/i,$from_url, $matches)){
$from_url = pages/.$matches[1];
}

in routes.php to map .html files in / to /pages.

eg. /file.html goes to /pages/file




Felix Geisendörfer wrote:
 I think I've already created what you are looking for. Good luck with it
 ; ):

 http://www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/

 I only use it on my webdesign page (see below), but it seems to work
 pretty well so far.

 Best Regards,
 Felix Geisendörfer aka the_undefined
 --
 http://www.thinkingphp.org
 http://www.fg-webdesign.de


 JohnRobert schrieb:
  Before I begin, I'm quite new to cake php (about 2 days using it). So
  far so good!
 
  Before I can fully commit, I need to be able to create static pages
  under / rather than only under /pages/. I had a go at changing some
  routes, to no avail!
 
  Before we continue, I'd also like to note I want /news/ /edit/ etc.. to
  behave in the default manner, i.e - running their equvilent controller
  and doing what they'ed do on a fresh install, so / isn't *only* a place
  for static pages, but also a few controllers of my choosing.
 
  I'd imagine this requires defining each controller in the routes
  config, I'm just not too sure how to do it, I found the manual a bit
  confusing.
 
 
  
 
 

 --090608090300010103060907
 Content-Type: text/html; charset=ISO-8859-15
 Content-Transfer-Encoding: quoted-printable
 X-Google-AttachSize: 1707

 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 html
 head
   meta content=text/html;charset=ISO-8859-15
  http-equiv=Content-Type
   title/title
 /head
 body bgcolor=#ff text=#00
 I think I've already created what you are looking for. Good luck with
 it ; ):br
 br
 a 
 href=http://www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/;http://www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp//abr
 br
 I only use it on my webdesign page (see below), but it seems to work
 pretty well so far.br
 br
 Best Regards,br
 Felix Geisendörfer aka the_undefinedbr
 div class=moz-signaturesmall--br
 a href=http://www.thinkingphp.org;http://www.thinkingphp.org/abr
 a href=http://www.fg-webdesign.de;http://www.fg-webdesign.de/a
 /small/div
 br
 br
 JohnRobert schrieb:
 blockquote
  cite=[EMAIL PROTECTED]
  type=cite
   pre wrap=Before I begin, I'm quite new to cake php (about 2 days using 
 it). So
 far so good!

 Before I can fully commit, I need to be able to create static pages
 under / rather than only under /pages/. I had a go at changing some
 routes, to no avail!

 Before we continue, I'd also like to note I want /news/ /edit/ etc.. to
 behave in the default manner, i.e - running their equvilent controller
 and doing what they'ed do on a fresh install, so / isn't *only* a place
 for static pages, but also a few controllers of my choosing.

 I'd imagine this requires defining each controller in the routes
 config, I'm just not too sure how to do it, I found the manual a bit
 confusing.




   /pre
 /blockquote
 /body
 /html
 
 --090608090300010103060907--


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