Re: Moving /pages/ to /

2006-06-14 Thread 100rk

>> If I find time...

Hi!

Before You'll start read pls this ticket:
https://trac.cakephp.org/ticket/142

and search roadmap for 'Router':
https://trac.cakephp.org/roadmap

Just for sure, You know - it is allways better to know what direction
has main stream, You will not write high quality code which will be not
approved to core just because of strategy/roadmap/worksform.

I'm curious what we'll see from You - notice Router will be singleton
in 2.0, so dynamic routes will be easy to implement.

Nice day!


--~--~-~--~~~---~--~~
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-14 Thread Felix Geisendörfer




depends - for a simple (.*).html -> pages/\\1 rewrite, propably yes.
But if you need dynamic routing (based on db entries), .htaccess won't
quite cut it. Then you have to check if certain controllers exist, and
if not route the requests to another controller and stuff ...

--
http://www.thinkingphp.org
http://www.fg-webdesign.de



Mika schrieb:

  Woudln't this be quicker to do in the .htaccess file?




  


--~--~-~--~~~---~--~~
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-14 Thread Mika

Woudln't this be quicker to do in the .htaccess file?


--~--~-~--~~~---~--~~
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-14 Thread Felix Geisendörfer




Hey,

I like your preg_match rule too, it seems like a good idea for legacy
compatibility. If I find time I could create a more complex $from_url
Router that would allow us to preg_replace and other techniques to get
the shop done, which could give a little more options then the standard
CakePHP router. However, the more we move away from the conventions the
more issues we might experience with Controller::base, Controller:here,
etc., so actually I shouldn't create this class, I think : p.

Thanks for your comment so ; ). 

--
http://www.thinkingphp.org
http://www.fg-webdesign.de



tjquoll schrieb:

  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




  
  


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/">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.thinkingphp.org
"http://www.fg-webdesign.de">http://www.fg-webdesign.de



JohnRobert schrieb:
"[EMAIL PROTECTED]"
 type="cite">
  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--

  
  



  


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



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
>
> 
> 
> 
> http-equiv="Content-Type">
>   
> 
> 
> I think I've already created what you are looking for. Good luck with
> it ; ):
> 
>  href="http://www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/";>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.thinkingphp.org
> http://www.fg-webdesign.de";>http://www.fg-webdesign.de
> 
> 
> 
> JohnRobert schrieb:
>   cite="[EMAIL PROTECTED]"
>  type="cite">
>   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--


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





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