Wizard Component and Routes

2009-06-09 Thread Dave Maharaj :: WidePixels.com
Having a go at the Wizard component...only issue I have is routing it. The routes they have defined will not work in my setup. They have Router::connect('/signup', array('controller' => 'signup', 'action' => 'wizard')); I need to modi

RE: Routes

2009-06-01 Thread Dave Maharaj :: WidePixels.com
Thanks! Works perfect. Dave -Original Message- From: Miles J [mailto:mileswjohn...@gmail.com] Sent: June-01-09 11:52 PM To: CakePHP Subject: Re: Routes Almost correct but here: Router::connect('/:user_slug/update/:update_action', array ('controller' => '

Re: Routes

2009-06-01 Thread Miles J
Almost correct but here: Router::connect('/:user_slug/update/:update_action', array ('controller' => 'users', 'action' => 'update'), array('pass' => array ('user_slug', 'update_action'), 'user_slug' => '[-_A-Za-z]+', 'update_action' => '[-_A-Za-z]+')); --~--~-~--~~~---

Routes

2009-06-01 Thread Dave Maharaj :: WidePixels.com
Does this route look right? or even possible? Router::connect('/:user_slug/update/:update_action',array('controller' => 'users', 'action' => 'update'),array('user_slug' => '[-_A-Za-z]+','pass' => array('user_slug') , 'update_action' => '[-_A-Za-z]+','pass' => 'update_action')); basically user_s

Re: Routes and AJAX

2009-05-30 Thread brian
On Sat, May 30, 2009 at 12:16 AM, Dave Maharaj :: WidePixels.com wrote: > Do you have to do anything special when you have custom routes and calling > an Ajax function? > > Trying to do something simple and no luck.update a div > > my routes take users/journals to /journa

Routes and AJAX

2009-05-29 Thread Dave Maharaj :: WidePixels.com
Do you have to do anything special when you have custom routes and calling an Ajax function? Trying to do something simple and no luck.update a div my routes take users/journals to /journals simply removing the "users" in the url Now on journals i want to load a entry (ele

Re: Are admin routes worthwhile? No automagic with Auth

2009-05-26 Thread Braindead
I use admin routing to build an administration interface that has a minimalistic design and is quite straight forward to the need to administer the main page (write news, edit user profiles etc.) So if you don't require this kind of admin interface than there is no need to use admin routing at all

Re: Are admin routes worthwhile? No automagic with Auth

2009-05-26 Thread Matti Putkonen
When sticking the isAuthorized functionality to AppController and running it automatically with BeforeFilter you can get the protection easily to all admin actions, no matter how many you have, automatically. This is what I did with BakeSale (http:// www.bakesalepro.com/). On 27 touko, 05:08, Sid

Are admin routes worthwhile? No automagic with Auth

2009-05-26 Thread Sidney
Hi All, This is a general question - I have read the manual, and got the code working. In my app I have a need for some admin functions e.g. reset password and change user status (banned/vip etc). So I set up admin prefix routing by uncommenting Configure::write ('Routing.admin', 'admin'); in

Re: .htaccess password protect admin routes

2009-05-26 Thread Sam Sherlock
http://snook.ca/archives/servers/password_protect_admin/ - S 2009/5/26 Roman Brunnemann > > Hi, > > I want to use the admin routes (this works) and protect the requests to > e.g. admin/products/edit with .htaccess > > Given that everything is rewrited there is no real adm

.htaccess password protect admin routes

2009-05-26 Thread Roman Brunnemann
Hi, I want to use the admin routes (this works) and protect the requests to e.g. admin/products/edit with .htaccess Given that everything is rewrited there is no real admin folder, so where do I have to place my .htaccess to tell, that users accessing a admin path have to make a normal

Re: Routes not finding .xml extension

2009-05-24 Thread Dr. Loboto
Router::connect( '/sitemap', array ('controller' => 'sitemaps', 'action' => 'index', 'ext' => 'rss') ); On May 22, 7:35 pm, paulinthought wrote: > Hi, > > I'm trying to create an xml sitemap as described in the > articlehttp://bakery.cakephp.org/articles/view/automatically-gener

Routes not finding .xml extension

2009-05-22 Thread paulinthought
Hi, I'm trying to create an xml sitemap as described in the article http://bakery.cakephp.org/articles/view/automatically-generate-dynamic-sitemaps I have followed the instructions there and I can now access my xml file in the browser at the address http://localhost/project/sitemap My problem is

RE: Routes regarding -> e-book by Matt Curry

2009-05-15 Thread Dave Maharaj :: WidePixels.com
Sweet deal! Thanks man! Great job on the book lots of great tips and tricks indeed. Thanks for sharing your insight. Dave -Original Message- From: Matt Curry [mailto:m...@mcurry.net] Sent: May-15-09 1:57 PM To: CakePHP Subject: Re: Routes regarding -> e-book by Matt Curry Hey D

Re: Routes regarding -> e-book by Matt Curry

2009-05-15 Thread Matt Curry
: > In the section regarding the add / edit functions in 1 he has the routes > Router::connect('/:controller/add', array('action' => 'edit')); > > How would you configure this for the admin routing? > > I tried > > Router::connect(

Re: Routes regarding -> e-book by Matt Curry

2009-05-15 Thread j0n4s.h4rtm...@googlemail.com
I didn't work with it yet but afaik 'prefix' => 'admin' On May 15, 12:57 am, "Dave Maharaj :: WidePixels.com" wrote: > In the section regarding the add / edit functions in 1 he has the routes > Router::connect('/:controller/add', array(

Routes regarding -> e-book by Matt Curry

2009-05-14 Thread Dave Maharaj :: WidePixels.com
In the section regarding the add / edit functions in 1 he has the routes Router::connect('/:controller/add', array('action' => 'edit')); How would you configure this for the admin routing? I tried Router::connect('/:controller/add', arr

Re: Using special chars in routes

2009-05-06 Thread Dr. Loboto
"+" in URL is encoded " ", get rid of it. On May 6, 4:02 pm, volka wrote: > Hi, > I hope someone has a hint for me. > > I have a controller named 'questions' and I'd like to set up the > follwing route: > > Router::connect('/questions+answers/*', array('controller' => > 'questions', 'action' =>

Re: Using special chars in routes

2009-05-06 Thread Stu
Maybe put a backslash '\' before the '+', let me know if this works, I doubt it though... --~--~-~--~~~---~--~~ 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.co

Re: Setting pagination url problem - something to do with Routes ??

2009-05-06 Thread Flipflops
Well... making progress but still not there. Right now I've got: Router::connect( '/*', array( 'controller' => 'nodes', 'action' => 'view', ), array('*' => '(!users|products)') This half works - the pagination is fixed and somethi

Using special chars in routes

2009-05-06 Thread volka
Hi, I hope someone has a hint for me. I have a controller named 'questions' and I'd like to set up the follwing route: Router::connect('/questions+answers/*', array('controller' => 'questions', 'action' => 'view')); Unfortunately it brings up a missing controller error, when clicking on a link.

Re: Setting pagination url problem - something to do with Routes ??

2009-05-05 Thread brian
It's also quite possible I'm wrong ;-) On Tue, May 5, 2009 at 11:29 AM, Flipflops wrote: > > Hi Brian > > Thanks, I'll give that a shot, it has been working fine until I came > across this instance - but that line of code in routes has been > carried around

Re: Setting pagination url problem - something to do with Routes ??

2009-05-05 Thread Flipflops
Hi Brian Thanks, I'll give that a shot, it has been working fine until I came across this instance - but that line of code in routes has been carried around for a while so I've probably been relying on something that has been depreciated or where the API has changed... or maybe it s

Re: Setting pagination url problem - something to do with Routes ??

2009-05-05 Thread brian
'whatever' => '(?!admin|pages|users|photos)' ) ); Untested, of course. On Tue, May 5, 2009 at 10:04 AM, Flipflops wrote: > > Hi > > I'm trying to paginate a set of results but Cake isn't building the > links properly, instead of the cor

Re: Setting pagination url problem - something to do with Routes ??

2009-05-05 Thread Flipflops
Sorry forgot to say would be something like: $this->passedArgs = array( [0] => seascapes [1] => summer-seascapes ); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, sen

Setting pagination url problem - something to do with Routes ??

2009-05-05 Thread Flipflops
Hi I'm trying to paginate a set of results but Cake isn't building the links properly, instead of the correct link the pagination helper is generating links that just output part of my routes config. The pagination is working fine in some parts of my application so something li

RE: Routes

2009-04-17 Thread Dave Maharaj :: WidePixels.com
mileswjohn...@gmail.com] Sent: April-18-09 12:19 AM To: CakePHP Subject: Re: Routes Put Router::connect('/agents/register', array('controller' => 'agents', 'action' => 'register')); infront of the other routes. If its put after

Re: Routes

2009-04-17 Thread Miles J
Put Router::connect('/agents/register', array('controller' => 'agents', 'action' => 'register')); infront of the other routes. If its put after it, it wouldnt get called because the first route takes precedence. --~--~-~--~

Routes

2009-04-17 Thread Dave Maharaj :: WidePixels.com
x27;pass' => array('agent_slug'))); so that gives me http:site/agents/slug but i have url i can not access now http:site/agents/register i tried Router::connect('/agents/register', array('controller' => 'agents', 'action' => 'r

Re: Routes Regex problem

2009-04-16 Thread visskiss
Well, I have stumbled upon something I didn't think of. By realizing that cake goes through routes in order, I simply forward the 'exceptional' routes to their proper place (controller/action) and then leave all the rest '/*' to the appropriate single con

Routes Regex problem

2009-04-16 Thread visskiss
Good day to you all, I have tried to solve this and it's killing me. My site is working well, but I am trying to perfect the URL's to optimize for search. The short question: Doe anybody know how to get the routes regex working so that all queries EXCEPT those in a given list

Re: Subdomains and Routes

2009-04-09 Thread Aurelius
thx! That was much easier as I expected, Cake rocks! On 9 Apr., 02:31, schneimi wrote: > Hi Aurelius, > > I use something like this in config/routes.php: > > $subdomain = substr(env("HTTP_HOST"), 0, strpos(env("HTTP_HOST"), > ".")); > > if ($subdomain != 'domain') { > Router::connect('/', ar

Re: Question about Routes and honoring MVC

2009-04-09 Thread Martin
results - if I understood correctly, CakePHP makes such caching possible) and generate custom routes according to the page paths. For an example, this is the hieararchy (I know it's deep, but just to draw the picture) for a targeted page which has its own controller: Page1 -> Page2

Re: Question about Routes and honoring MVC

2009-04-08 Thread Miles J
How would information from a database be used to make custom routes? Why not just use Cakes default setup. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send ema

Re: Subdomains and Routes

2009-04-08 Thread schneimi
Hi Aurelius, I use something like this in config/routes.php: $subdomain = substr(env("HTTP_HOST"), 0, strpos(env("HTTP_HOST"), ".")); if ($subdomain != 'domain') { Router::connect('/', array('controller' => 'users', 'action' => 'view', 'pass' => $subdomain)); } Regards, Michael On 9 Apr.,

Question about Routes and honoring MVC

2009-04-08 Thread Martin
Hello everyone, this is my first post here. I'm just starting with CakePHP and getting familiar with MVC. I have a question about defining custom routes; if I need some information from a database to help me with generating custom routes, would the proper way to do that be to use a contr

Subdomains and Routes

2009-04-08 Thread Aurelius
Hi! I want to have a subdomainrouting from http://(.*).domain.com mappt to htpp://www.domain.com/users/view/username:$1, which should be mappt standardwise like a normal cake app.(or mybe directly). I Don't really understand much about modRewrite and even less about cakes dispatcher :-/ Can some

custom routes issue

2009-04-08 Thread Johnny
I have the following routes set up for the front end of my app: Router::connect('/become-our-client', array('controller' => 'users', 'action' => 'register')); Router::connect('/contact-us', array('controller' => &#

Re: Dynamic MySQL-driven routes

2009-03-24 Thread James K
Having dynamic routes driven out of the database - even with caching - sounds like a large amount of overhead to add to your application for very little gain (not to mention very error prone... users making the same routes for different information, for instance). Why not, instead, allow your

Re: Dynamic MySQL-driven routes

2009-03-18 Thread dom111
Hi AD, Thanks for the speedy response, much appreciated! I totally agree with the point about database driven, caching the routes is definitely the way to go and seems fairly simple to implement (I think!). I also agree with keeping the routes simple, and I'd love to, maybe I'll hav

Re: Dynamic MySQL-driven routes

2009-03-18 Thread AD7six
a pretty specific issue, and one I'm not finding a lot of > information on (maybe I'm not looking in the right places, I hope I > haven't missed a discussion in here...), and I'm hoping it's not > because it's too hard to do... > > It's regardin

Dynamic MySQL-driven routes

2009-03-18 Thread dom111
rmation on (maybe I'm not looking in the right places, I hope I haven't missed a discussion in here...), and I'm hoping it's not because it's too hard to do... It's regarding routes, and as the subject suggests, dynamic database- driven ones... I'm currently working

Re: $this->passedArgs breaking my Routes

2009-03-09 Thread geoff
lper, and it still did not work. The prefix was ignored completely. > > > This seems like it could be a bug? > > > > On Mar 6, 3:46 pm, geoff wrote: > > > > > Yeah, I've tried every possible combination that I can think of, and > > > > nothi

Re: $this->passedArgs breaking my Routes

2009-03-09 Thread geoff
Where would I call that method? In the view, or in routes config? On Mar 8, 11:44 pm, biesbjerg wrote: > Have you tried Router::connectNamed(array('images')); ? > Each named parameter needs to be connected like this for url > generation to function correctly. > > On 6

Re: $this->passedArgs breaking my Routes

2009-03-08 Thread biesbjerg
Have you tried Router::connectNamed(array('images')); ? Each named parameter needs to be connected like this for url generation to function correctly. On 6 Mar., 08:53, geoff wrote: > Hey all. > > I have a fairly troublesome problem that has really been grating my > goat for the past little whil

Re: $this->passedArgs breaking my Routes

2009-03-08 Thread majna
noticed is that when > > > the passedArgs array is passed to the paginator helper, if there is > > > any other named parameter other than "page", the routes do not work. > > > So, I'm guessing that this is probably something to do me not having > > >

Re: Routes

2009-03-07 Thread brian
sing the array format when creating links: $html->link( $post['Post']['title'], array( 'controller' => 'posts', 'action' => 'view', 'id' => $post['Po

RE: Routes - got it figured

2009-03-06 Thread Dave Maharaj :: WidePixels.com
I figured it right afterwards thanks Dave _ From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: March-07-09 1:26 AM To: cake-php@googlegroups.com Subject: Routes Can someone provide a simple way to configure routes? Been trying this to no avail. What I

Routes

2009-03-06 Thread Dave Maharaj :: WidePixels.com
Can someone provide a simple way to configure routes? Been trying this to no avail. What I want is to remove the view/1 from the URL so it looks like www.site/posts/1 and not www.site/posts/view/1 Router::connect('/posts/*', array('controller' => 'posts', &#x

Re: $this->passedArgs breaking my Routes

2009-03-06 Thread geoff
t; > nothing seems to work correctly. One thing I have noticed is that when > > the passedArgs array is passed to the paginator helper, if there is > > any other named parameter other than "page", the routes do not work. > > So, I'm guessing that this is probably s

Re: $this->passedArgs breaking my Routes

2009-03-06 Thread geoff
an think of, and > nothing seems to work correctly. One thing I have noticed is that when > the passedArgs array is passed to the paginator helper, if there is > any other named parameter other than "page", the routes do not work. > So, I'm guessing that this is probably

Re: $this->passedArgs breaking my Routes

2009-03-06 Thread geoff
Yeah, I've tried every possible combination that I can think of, and nothing seems to work correctly. One thing I have noticed is that when the passedArgs array is passed to the paginator helper, if there is any other named parameter other than "page", the routes do not work. S

Re: routes regex

2009-03-06 Thread Alexandru Ciobanu
Alfredo Quiroga-Villamil wrote: > Btw, I think I might have missed a digit in that regex: > > /\w+-\w+-\w+-\d+-\+-\d+-\w+-\w+/ > > > Thanks Alfredo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group

Re: $this->passedArgs breaking my Routes

2009-03-06 Thread majna
It's not working even you pass all params to paginator in view: $paginator->options(array('url'=>array_merge(array('prefix'=>$this- >params['prefix']),array('wap'=>true), $this->passedArgs))); debug($paginator->options); Bug? I would like to see multiple Routing.admin, like Routing.admin Routing

$this->passedArgs breaking my Routes

2009-03-05 Thread geoff
Hey all. I have a fairly troublesome problem that has really been grating my goat for the past little while. It has to do with the supplying of named parameters to a URL, and having them break my pagination. I have a feeling that the example below might explain this better: -

Re: routes regex

2009-03-05 Thread Alfredo Quiroga-Villamil
quot;; > } else { >   print "no match \n"; > } > > Regards, > > Alfredo > On Thu, Mar 5, 2009 at 3:12 PM, Alexandru Ciobanu > wrote: >> >> Hi guys, >> >> I'm having some trouble with custom routes. >> >> I'm trying to match

Re: routes regex

2009-03-05 Thread Alfredo Quiroga-Villamil
/\w+-\w+-\w+-\d+-\+-\w+-\w+/ ) { print "yes it matched \n"; } else { print "no match \n"; } Regards, Alfredo On Thu, Mar 5, 2009 at 3:12 PM, Alexandru Ciobanu wrote: > > Hi guys, > > I'm having some trouble with custom routes. > > I'm trying to

routes regex

2009-03-05 Thread Alexandru Ciobanu
Hi guys, I'm having some trouble with custom routes. I'm trying to match /asus-eee-pc-900-+-2-gb-ram/1521 My line for this in routes.php is: Router::connect('/product-details/:slug/:id', array('controller' => 'store', 'action' => 

Re: HTTP redirect messes up Cake routes

2009-03-05 Thread brian
ME} !-d > RewriteRule ^(.*)$ /lii/$1 > > RewriteCond %{HTTP_HOST} ^(www\.)?(mydomain.net)$ > RewriteRule ^(/)?$ lii/index.php [L] > > > My public html files are in public_html/lii. The added 'lii/' never > shows up, as it should be. > > Everything looks fine until it come

HTTP redirect messes up Cake routes

2009-03-05 Thread gattu_marrudu
Everything looks fine until it comes to the routes. The router adds 'lii/' to all the URLS when it translates them. After debugging a little I got this: //debug (Router::getPaths()); Array ( [plugin] => [controller] => [action] => [base] => /lii [here] =>

Problems with Routes

2009-02-18 Thread Eber Freitas Dias
Please, take a look at this ::: http://pastie.org/392952 ::: as you can see, it inserts '/painel/' in front of the controller and action... how to avoid that? realise that I have 'prefix' => null, 'painel' => false on the $form->create() options array... Thanks in advanced! :) -- Éber Freitas Di

Re: cakephp 1.2 routes simple example ?

2009-02-13 Thread Miles J
about_controller index action will automatically become /about/. You only do routes if you want custom looking urls that cant be done using the controller/action setup. On Feb 13, 6:29 pm, Mark Thien wrote: > Hi guys, > > I tried to use cakephp routes function but I just couldn&#x

cakephp 1.2 routes simple example ?

2009-02-13 Thread Mark Thien
Hi guys, I tried to use cakephp routes function but I just couldn't get it to work. I have read thru the documentation at http://book.cakephp.org/view/46/Routes-Configuration but there isn't any simple complete example. What I want is just, for example, I have a page like about.p

Re: set routes for Admins controller?

2009-01-07 Thread brian
Unfortunately, these are not within the same controller. Thanks for the tip, though. I'm going to check to see if that's the reason it seemed to be working fine. On Thu, Jan 8, 2009 at 1:36 AM, Nature Lover wrote: > > Hi! > > While working with admin routing, remember to mention just action in >

Re: set routes for Admins controller?

2009-01-07 Thread Nature Lover
Hi! While working with admin routing, remember to mention just action in the redirect array if you are redirecting within same model. Like if current page is: /admin/users/manage and you have to redirect, after some action, to the user profile the redirection will be: $this->redirect(array('a

set routes for Admins controller?

2009-01-07 Thread brian
Anyone else have a model named Admin? I'm trying to figure out how to deal with admin routing, given I have a controller named, admins. I did have this working earlier but, as with so many things Cake routing, it's all messed up suddenly. Don't get me wrong--the reverse routing has been terrific.

trying to simplify my routes

2009-01-07 Thread brian
I have several models which are extensions of User. For each type, I've set up a routing scheme such that (for controllers, "controller1", "controller2", "controller3", "controller4") /controllerX/some_slug ... will take me to the view action, passing the slug, for that controller. Router::con

Can Routes Handle HTTPS?

2009-01-06 Thread Rob Wilkerson
et pages that do not need to be secure. It will work, but it's an awfully distributed solution. Is there any way to do this with routes? I haven't turned anything up in the docs or in searches that doesn't rely on environment detection and redirection. If it can't be done

Re: Auth Redirect And Routes

2009-01-06 Thread Novice Programmer
r'=>'invites', 'action'=>'index); Changed it to: $this->Auth->loginAction = '/invites/'; the string based url works and my custom routes work fine.. Would appreciate if some one could throw some light on this behavior in Auth.php. Thanks. On Tue,

Re: Auth Redirect And Routes

2009-01-06 Thread Novice Programmer
::normalize($url); this returns the full url to the controller/action pair rather than considering the url formed using the routes. So if i have some thing like follows in my routes.php: Router::connect('/:uid/*', array('controller' => 'entities', 'action'

question about routes. different actions based on sub domain

2009-01-05 Thread Matthew Camuto
hi there. my question should be simple in nature but alas i am stuck. here is the scenaro. i have a side, call it 'd'. what i want is some themes. i.e. food.d.net -> action foo cars.d.net -> action foo i got that all working with apache and using before filter to 'figure out. what i need. all t

Re: Auth Redirect And Routes

2009-01-05 Thread Webweave
;redirect($this->Auth->referer()); > > Though the user is redirected to the proper page but my custom Routes break > when such a redirection happens. Here is my auth setup. > >            $this->Auth->actionPath = null; >            $this->Auth->loginAction = array

AW: Auth Redirect And Routes

2009-01-05 Thread Liebermann, Anja Carolin
: cake-php@googlegroups.com Betreff: Re: Auth Redirect And Routes i meant $this->redirect($this->Auth->redirect()); Sorry for the typo.. :( Thanks. On Mon, Jan 5, 2009 at 4:52 PM, Novice Programmer wrote: Hello All, I am trying to set up auth redirect. i.e

Re: Auth Redirect And Routes

2009-01-05 Thread Novice Programmer
ich can't be accessed without the > username/password. After the user authenticates, I try to redirect the user > back to the page which he was accessing using > $this->redirect($this->Auth->referer()); > > Though the user is redirected to the proper page but my custom Route

Auth Redirect And Routes

2009-01-05 Thread Novice Programmer
ct($this->Auth->referer()); Though the user is redirected to the proper page but my custom Routes break when such a redirection happens. Here is my auth setup. $this->Auth->actionPath = null; $this->Auth->loginAction = array('controller&#x

Re: With debug 0 routes stop working and all pages not found

2008-12-19 Thread Ryan McKillen
for months and have never had a problem when changing debug mode >>> to 0. >>> I haven't made any edits to routes.php, any .htaccess files or to >>> Apache configuration. >> >>> Any ideas? Does Cake inherently handle routes differently when debug >>&

Re: With debug 0 routes stop working and all pages not found

2008-12-19 Thread mark_story
to 0. > > I haven't made any edits to routes.php, any .htaccess files or to > > Apache configuration. > > > Any ideas? Does Cake inherently handle routes differently when debug > > is on/off? --~--~-~--~~~---~--~~ You received this mes

Re: With debug 0 routes stop working and all pages not found

2008-12-19 Thread RyOnLife
mode to 0. > I haven't made any edits to routes.php, any .htaccess files or to > Apache configuration. > > Any ideas? Does Cake inherently handle routes differently when debug > is on/off? --~--~-~--~~~---~--~~ You received this message becau

With debug 0 routes stop working and all pages not found

2008-12-19 Thread RyOnLife
t made any edits to routes.php, any .htaccess files or to Apache configuration. Any ideas? Does Cake inherently handle routes differently when debug is on/off? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP&

List all open routes?

2008-12-12 Thread Dav
Is there a way to list all routes that is defined/open for an app!? For my production setting, I just want to make sure no "forgotten" urls are accessible. Would also be nice to get a list of all controllers + methods that require Auth or Not.

Re: routes, controller name and model name

2008-12-08 Thread Filip Camerman
Meanwhile I figured I can combine all the actions in one route, but I still have to list them all: Router::connect('/collections/:action/*', array('controller' => 'collections'), array('action' => 'add|edit|delete')); I guess that's the least unelegant way then. Thx for your reaction thou

Re: routes, controller name and model name

2008-12-07 Thread brian
array('slug' => '[-_A-Za-z0-9]+') ); On Sun, Dec 7, 2008 at 5:56 AM, Filip Camerman <[EMAIL PROTECTED]> wrote: > > I'm making a site for an artist and when showing image galleries of > art collections I want url's like > > www.site.com/

routes, controller name and model name

2008-12-07 Thread Filip Camerman
I'm making a site for an artist and when showing image galleries of art collections I want url's like www.site.com/collections/name-of-collection Now I also have a database table for collections, and hence a collection_controller and a collection model. First I had my routes like thi

Re: admin routes prefix routing paginator problems..

2008-12-07 Thread majna
You can play with $paginator in view: $paginator->options(array('prefix' =>'')); $paginator->options(array('url' =>'')); On Dec 7, 1:34 am, Andras Kende <[EMAIL PROTECTED]> wrote: > Hello, > > Im trying to do an ap

admin routes prefix routing paginator problems..

2008-12-06 Thread Andras Kende
Hello, Im trying to do an app with 3 areas admin routes which requires login /admin/ /nurse/ /practice/ routes.php: Router::connect("/admin/:controller/:action/*", array ("prefix"=>"admin", "admin"=>true)); Router::connect("/nurse/:cont

Re: Advanced Routes

2008-11-25 Thread Graham Weldon
You should be able to do something like: Router::connect('/:username/:controller/:action/*', array(), array('username' => '[a-z0-9]*')) Read through this: http://book.cakephp.org/view/542/Defining-Routes The most relevant examples are down the bottom, but wor

Advanced Routes

2008-11-25 Thread BeroFX
Hi guys! Imagine you have a standard social network with users who can have blogs, pictures and videos. I need to setup my routes like this: http://www.mysite.com/michael --> this is like / users/view/123 http://www.mysite.com/michael/videos/123 --> this would show mi

routes, changing controller name

2008-11-13 Thread tiberium911
I saw an example on here that used variables in the regex part. Router::connect( "/articles/:year/:month/:day/:slug", array("controller" => "articles", "month" => null, "day" => null, "slug" => null), array('year' => $Year, 'month' => $Month, 'day' => $Day, 'slug' => "[A-Za-z0-9_\-]+")

Re: Routes - want 'wordpress' like flexibility

2008-11-12 Thread Jon Bennett
> Only public, route-able actions go here. This is required because > every other pattern is going to be captured as a category by the route > following it. ahh, that's what I thought. cheers, Jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-

Re: Routes - want 'wordpress' like flexibility

2008-11-11 Thread Nate
On Nov 11, 8:43 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > One question, with the following route: > > Router::connect("/articles/:action", >                 array("controller"=>"articles"), >                 array("action" => "list|controller|actions|here") >         ); > > Am I right in t

Re: Routes - want 'wordpress' like flexibility

2008-11-11 Thread Jon Bennett
); > > Am I right in thinking I need to list ALL methods my Articles > controller has here? Is that just public or private as well? the answer is at least in part you need to add your public actions, not sure about private yet. Routes work a treat though, I have: Router::connect(

Re: Routes - want 'wordpress' like flexibility

2008-11-11 Thread Jon Bennett
> Off the cuff (so I'm not even sure it parses): forgot to say - sure does parse ok! jb -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: Routes - want 'wordpress' like flexibility

2008-11-11 Thread Jon Bennett
, array("action" => "list|controller|actions|here")); > > Router::connect("/articles/:slug", array("controller" => "articles", > 'action' => 'view'), array("slug" => "[A-Za-z0-9_\-]+"));

Re: Routes - want 'wordpress' like flexibility

2008-11-11 Thread Nate
es.php. Also, passing null to keys in the second parameter makes those parameters optional, so that first route takes care of all your date / date + slug URLs. On Nov 11, 2:12 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > hi folks, > > I'd like to have the following u

Routes - want 'wordpress' like flexibility

2008-11-11 Thread Jon Bennett
hi folks, I'd like to have the following urls: /articles /articles/$category_slug /articles/$year /articles/$year/$month /articles/$year/$month/$day /articles/$year/$month/$day/$article_slug I've been looking at routes but hit a mental block, most likely due to a lack of regex

Re: Paginator links and Custom routes

2008-11-05 Thread Aaron Gustafson
On Oct 15, 9:50 am, avairet <[EMAIL PROTECTED]> wrote: > I've an issue with custom routing and automagic paginator links... > How can I keep this pattern in the paginator links (prev, first, > numbers)? > Because all my tests have failed: the paginator links always contain > "http://www.mywebsi

Paginator links and Custom routes

2008-10-15 Thread avairet
Dear All, I've an issue with custom routing and automagic paginator links... Here are the patterns I would like for my uris: http://www.mywebsite.com/petites-annonces/belles-annonces/prix http://www.mywebsite.com/petites-annonces/belles-annonces/date http://www.mywebsite.com/petites-annonces/be

Re: class 'Routes' not found

2008-09-25 Thread Rafael Bandeira aka rafaelbandeira3
> class 'Routes' not found You are mispelling "Router" somewhere in your application, probably on app/config/routes.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" g

class 'Routes' not found

2008-09-25 Thread mirfan
I have pasted my working copy on a new computer of cake but when i try to access it it give me the following error class 'Routes' not found any help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: Routes question (what if second pass variable is set)

2008-09-05 Thread villalvilla
look at this file in your installation: cake/tests/cases/libs/ router.test.php hope this helps... On 5 sep, 20:41, Fahad <[EMAIL PROTECTED]> wrote: > hi, > > i m developing my own blog application using cakephp and need some > help with routes. > > for example, i ha

<    1   2   3   4   5   6   >