Re: Route is overwriting routes of same controller

2016-01-03 Thread John Andersen
to start with a real controllers' name. You could use other words instead of catalogs. Did the above help you solve your issue? Enjoy, John On Monday, 28 December 2015 11:31:33 UTC+2, Sven Mäurer wrote: > > Is it right that all other routes of the same controller are overwritten > if

Route is overwriting routes of same controller

2015-12-28 Thread Sven Mäurer
Is it right that all other routes of the same controller are overwritten if I define the following? Router::connect( '/catalogs/:name', ['controller' => 'catalog_groups', 'action' => 'view'], ['name' => '[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*'] ); I am using CakePHP 2.7.* --

Custom routes preventing modle loading

2015-09-14 Thread shetlandranger
Hi, I have a controller (Stops) that is accessed through a custom route. When I try to access a page I get errors about calling functions on a boolean. It turns out that $this->Stops is set to false. To get my functions to work properly I have to add $this->loadModel("Stops"); to my functions,

3.0 -- Pagination Helper with Custom Routes causes Missing Route Exception!

2015-03-26 Thread Michael Riddle
I'm trying to use the pagination helper, but it's causing missing route exception when used with any method that tries to generate a link. my route code looks like this: Router::prefix('manage', function ($routes) { $routes-connect('/:organizationNeedle',['controller'='Organizations','action

CakePHP routes always pointing to same action

2015-01-07 Thread Lợi Nguyễn Đình
I am facing some problems in routing under cakephp there are two actions in my controller they are as below: example.com/posts/show/show-by-day example.com/posts/view/slug-post I want them as: example.com/article/show-by-day.html example.com/article/slug-post.html So i routes file under config

Re: CakePHP routes always pointing to same action

2015-01-07 Thread John Andersen
as: example.com/article/show-by-day.html example.com/article/slug-post.html So i routes file under config file I wrote as: Router::connect('/article/:show_by_day', array('controller' = 'posts', 'action' = 'show'), array('pass' = array('show_by_day'))); Router::connect('/article/:slug', array

Re: CakePHP routes always pointing to same action

2015-01-07 Thread John Andersen
example.com/posts/view/slug-post I want them as: example.com/article/show-by-day.html example.com/article/slug-post.html So i routes file under config file I wrote as: Router::connect('/article/:show_by_day', array('controller' = 'posts', 'action' = 'show'), array('pass' = array('show_by_day

Problem with creating routes

2014-12-26 Thread Sam Clauw
I have a simple project that I'm trying to convert to a CakePHP project: http://optiekcardoen.be/home The page navigation is very simple: - Home (/) - Shop (/shop) - Products (/products) - Frames (/products/frames) - Sunglasses (/products/sunglasses) - Lenses (/products/lenses) -

Browser caching routes (3.0)

2014-12-01 Thread Dieter Gribnitz
I have a small request. I struggled getting my routes to work properly because firefox was caching routes. Could you please put a note near the beginning of the cache documentation to warn people to turn browser cache off. Here is how you do it in firefox: 1. Enter about:config in url. 2

Getting rid of CakePHP's default routes.

2014-08-07 Thread Nethues_Developer
Open the app/Config/routes.php file and comment or erase this line (should be at the bottom of the file) *require CAKE . 'Config' . DS . 'routes.php';* Remember to define your routes otherwise this won't work well. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter

3.0alpha1: Recent commit removes default Routes

2014-07-05 Thread Joe Theuerkauf
i did a Composer update last night my project exploded. Turns out a [recent commit https://github.com/cakephp/cakephp/commit/a30f1c505c4a69bb4abb94d5b1d7aec1ffbd7015] removed /src/Config/routes.php. Being new to programming within a framework, comprehending dealing with routes is still

Re: 3.0alpha1: Recent commit removes default Routes

2014-07-05 Thread José Lorenzo
] removed /src/Config/routes.php. Being new to programming within a framework, comprehending dealing with routes is still a couple steps down the road for me. So i managed to get my project working again: 1. In App/Config/routes.php i had to comment the line at the end reading require CAKE

Re: 3.0alpha1: Recent commit removes default Routes

2014-07-05 Thread José Lorenzo
New documentation is here http://book.cakephp.org/3.0/en/development/routing.html#routes-configuration On Saturday, July 5, 2014 8:42:15 PM UTC+2, Joe Theuerkauf wrote: i did a Composer update last night my project exploded. Turns out a [recent commit https://github.com/cakephp/cakephp

Paginator and multilingual routes

2013-10-02 Thread Anna P
Hello. I have a problem with paginator helper. I'm developing an app in 2 language versions. The app conatains among others blog, which is paginated. Now, the url's in routes.php look for exmaple like this: Router::connect('/blog/search/*', array('controller' = 'blog_categories', 'action' =

Re: Paginator and multilingual routes

2013-10-02 Thread Reuben
You would need something else to differentiate the language used for the reverse routing. Router::connect('/blog/search/*', array('controller' = 'blog_categories', 'action' = 'search', 'lang' = 'en')); Router::connect('/blog/suche/*', array('controller' = 'blog_categories', 'action' =

Re: Routes and multilanguage site

2013-06-01 Thread lowpass
Another tip. bootstrap: Configure::write('Config.languages', array('eng','ned', 'deu')); routes: $lang_regexp = implode('|', Configure::read('Config.languages')); Now you can use the following without having to repeat your list of langs: 'language' = $lang_regexp, On Thu, May 30, 2013 at 4

Re: php cms and rewriteRule and cakephp routes

2013-05-30 Thread Dakota
vendors piwik piwik is a php cms (just php no framework) but this address (mySite.com/piwik) don't go to /piwik folder and wan't to use rewriteRule and cakephp routes for it I try lot of htaccess codes to resolve it but it didn't work somthing like: IfModule mod_rewrite.c

Routes and multilanguage site

2013-05-30 Thread Bogdan Soos
Hi there, Try changing the order, nothing is being routed after your first rule, at least move the first rule at the end, that should be your last rule. Regards, Bogdan. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You

Re: Routes and multilanguage site

2013-05-30 Thread iFemke
That worked! Thanks! I feel so stupid now haha. We tried so many things and in the maintime it would all have worked if we had just put that part below everything else. Op donderdag 30 mei 2013 08:28:02 UTC+2 schreef Bogdan Soos het volgende: Hi there, Try changing the order, nothing is

Re: php cms and rewriteRule and cakephp routes

2013-05-30 Thread iFemke
We use our own CMS with CakePHP websites (we're currently translating our own cms into a new cakephp cms.). We use the same structure as you, (app, lib, plugins, vendors, cms) and we don't do anything with the .htaccess files inside the cakephp part (we also use routes, but don't create a /cms

Routes and multilanguage site

2013-05-29 Thread iFemke
Hi, We have a problem with routes and our multilanguage site. We tried different salutions, but we can't get it to work. We have set it up like this: Router::connect('/', array('controller' = 'pages', 'action' = 'display', 'home')); Router::connect('/:language', array('controller' = 'pages

Re: php cms and rewriteRule and cakephp routes

2013-05-29 Thread Mehrdad Dadkhah
thanks I use it IfModule mod_rewrite.c RewriteEngine on RewriteCond %{REQUEST_URI} !^/piwik/* RewriteRule^$ app/webroot/[L] RewriteCond %{REQUEST_URI} !^/piwik/* RewriteRule(.*) app/webroot/$1 [L] /IfModule and it's work -- Like Us on FaceBook

Re: php cms and rewriteRule and cakephp routes

2013-05-20 Thread André Luis
piwik piwik is a php cms (just php no framework) but this address (mySite.com/piwik) don't go to /piwik folder and wan't to use rewriteRule and cakephp routes for it I try lot of htaccess codes to resolve it but it didn't work somthing like: IfModule mod_rewrite.c RewriteEngine

php cms and rewriteRule and cakephp routes

2013-05-19 Thread Mehrdad Dadkhah
hi I have this folders in the host root: app lib plugins vendors piwik piwik is a php cms (just php no framework) but this address (mySite.com/piwik) don't go to /piwik folder and wan't to use rewriteRule and cakephp routes for it I try lot of htaccess codes to resolve it but it didn't work

REST routes without mod_rewrite

2013-03-07 Thread Mauricio Tellez
Hi, my client's web server don't has mod_rewrite enable, so I installed cake without mod_rewrite, everything work fine but REST routing. I made some test at my developing server and with mod_rewrite enable a GET request to http://localhost/Morrallas/1 is mapped to MorrallasController's view

Routes are confusing me

2012-11-27 Thread iFemke
I'm working on the routes of my CakePHP site. The 'easy' ones I have already set like: Router::connect('/contact', array('controller' = 'contacts', 'action' = 'index')); These are working. But now I am confused as to how to continue with the more complex routing. For example, my url now

Re: Routes are confusing me

2012-11-27 Thread lowpass
On Tue, Nov 27, 2012 at 10:16 AM, iFemke femkevgem...@gmail.com wrote: I'm working on the routes of my CakePHP site. The 'easy' ones I have already set like: Router::connect('/contact', array('controller' = 'contacts', 'action' = 'index')); These are working. But now I am confused as to how

Routes with optional parameters

2012-11-07 Thread Jeremy Burns
How do I set up a route that sometimes has a parameter and sometimes doesn't? For example, I have the following two routes but I'm sure they could be combined into one? Router::connect( '/open-account/:id', array( 'controller' = 'users', 'action' = 'add' ), array( 'pass' = array('id'), 'id

Re: Routes with optional parameters

2012-11-07 Thread lowpass
the following two routes but I'm sure they could be combined into one? Router::connect( '/open-account/:id', array( 'controller' = 'users', 'action' = 'add' ), array( 'pass' = array('id'), 'id' = '[a-z]+' ) ); Router::connect( '/open-account', array( 'controller' = 'users', 'action' = 'add

Problem with Routes. CakePHP repeating parameter

2012-10-06 Thread Kico Zaninetti
Hi, I'm having a problem and don't know where is the problem, maybe someone can help me out. I have created the following routes: foreach($cats as $cat) { $regra .= $cat[Categoria][url_rapida].|; } $regra = (.substr($regra, 0,-1).); // this return the structure (category-name|category-other

Re: Problem with Routes. CakePHP repeating parameter

2012-10-06 Thread Kico Zaninetti
help me out. I have created the following routes: foreach($cats as $cat) { $regra .= $cat[Categoria][url_rapida].|; } $regra = (.substr($regra, 0,-1).); // this return the structure (category-name|category-other-name|products|etc) //this route works fine Router::connect

Re: Documentation on modifying default REST routes

2012-08-10 Thread Mike Griffin
On Thu, Aug 9, 2012 at 4:38 PM, Lightee lightai...@gmail.com wrote: What if the wanted data to be returned is based on data fields other than the id? It is restricting to get data based on id only. Is there some way to get data based on other fields of the table? Did you look here:

Re: Documentation on modifying default REST routes

2012-08-10 Thread Lightee
Thanks for your patient replies. Yes, I did read it even a few times but cannot be sure if I understand correctly. The problem is there is no sample code to test one's understanding. ?phpRouter::connect( /:controller/:id, array(action = edit, [method] = PUT), array(id = [0-9]+));

Re: Documentation on modifying default REST routes

2012-08-10 Thread Mike Griffin
On Fri, Aug 10, 2012 at 9:58 AM, Lightee lightai...@gmail.com wrote: Thanks for your patient replies. Yes, I did read it even a few times but cannot be sure if I understand correctly. The problem is there is no sample code to test one's understanding. ?php Router::connect(

Documentation on modifying default REST routes

2012-08-09 Thread Lightee
Dear Cakephp gurus, I am trying to build web services using CakePHP. The default REST routes are not suitable for me as add, edit, update, delete are already taken up for other purposes. I need to modify the default rates. From http://book.cakephp.org/2.0/en/development/rest.html

Re: Documentation on modifying default REST routes

2012-08-09 Thread Mike Griffin
On Thu, Aug 9, 2012 at 1:41 PM, Lightee lightai...@gmail.com wrote: Dear Cakephp gurus, ?php Router::resourceMap(array( array('action' = 'index', 'method' = 'GET', 'id' = false), array('action' = 'view', 'method' = 'GET', 'id' = true), array('action' = 'add', 'method' = 'POST',

Re: Documentation on modifying default REST routes

2012-08-09 Thread Lightee
What if the wanted data to be returned is based on data fields other than the id? It is restricting to get data based on id only. Is there some way to get data based on other fields of the table? The id bit probably means that an id is being sent to the method. A view method needs an id to

Re: Routes with slugs, pagination problem

2012-06-29 Thread lowpass
Router::connect( '/:slug', array( 'controller' = 'categories', 'action' = 'view' ), array( 'slug' = '[-a-z0-9]+', 'pass' = array('slug') ) ); Router::connect( '/:slug/:page',

Routes vs Type checking for Action Parameters, best practice?

2012-06-28 Thread Poyan Nabati
Lets say I have a controller Books with an action view() defined as follows: class BooksController extends AppController { public function view($id) { // something } } Let's assume that $id is supposed to be of a numeric type. I see two options; 1) Setup the route so that it only

Re: Routes vs Type checking for Action Parameters, best practice?

2012-06-28 Thread Jeremy Burns | Class Outfit
What happens if you pass an $id that is an integer but that $id doesn't exist in the books table? Jeremy Burns Class Outfit http://www.classoutfit.com On 28 Jun 2012, at 11:26:40, Poyan Nabati wrote: Lets say I have a controller Books with an action view() defined as follows: class

Re: Routes vs Type checking for Action Parameters, best practice?

2012-06-28 Thread Poyan Nabati
That's another type of error though. It's something have to handle in your application but I don't see the relation to my OP. -- 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

Re: Routes vs Type checking for Action Parameters, best practice?

2012-06-28 Thread Jeremy Burns | Class Outfit
I disagree. I think you're not using routes in their purest form (to route stuff in the right way - rather than error trapping) and even if it passes you still need to check the validity in the controller and redirect if necessary. Why do that in two places? And what happens in the router

Re: Routes vs Type checking for Action Parameters, best practice?

2012-06-28 Thread Dr. Tarique Sani
Apart from what Jeremy said you should also remember that routes are expensive. Use them wisely Tarique On Thu, Jun 28, 2012 at 5:36 PM, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: I disagree. I think you're not using routes in their purest form (to route snip

Re: Routes vs Type checking for Action Parameters, best practice?

2012-06-28 Thread Poyan Nabati
I think you're not using routes in their purest form (to route stuff in the right way - rather than error trapping. Thing is, if you haven't supplied an integer, then there's really no matching action for the URL you've requested. I think that's completely in line with the purpose of routes

Re: Routes vs Type checking for Action Parameters, best practice?

2012-06-28 Thread Kamisama
('/books/view/:id', array('controller'='books', 'action'='view'), array('pass' = array('id'), 'id' = '[0-9]+?')); There's no benefits of enforcing a numeric validation on the ID in this case. But if you have routes like that : Router::connect('/books/:id', array('controller'='books', 'action

Routes with slugs, pagination problem

2012-06-28 Thread Ovidiu Marinoiu
Hello, I have created a route which looks like this Router::connect('/:slug', array('controller' = 'categories', 'action' = 'view'), array('pass' = array('slug'))); Until here, everything works okey, visiting the link http://example.com/animals-and-pets, works perfect. On this page I have a

Problem with Pagination and Routes

2012-05-30 Thread Glauco Custódio
Hi guys, I have this route: Router::connect('/comparacao/:id/:slug', array('controller' = 'products', 'action' = 'comparison'), array('pass' = array('id', 'slug')) ); When I access below url, it work successfully

Re: Problem with Pagination and Routes

2012-05-30 Thread Salines
See here https://groups.google.com/d/topic/cake-php/DS1rF9RiKBk/discussion -- 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

Re: Problem with Pagination and Routes

2012-05-30 Thread Glauco Custódio
Thank you.It will solve my problem. But, just for knowledge, what I need to do for pagination with name params works (see below)? **http://myproject/comparacao/6315/Lata-DVD-O-Fantastico-Jaspion-Vol-1-5-DVDs

Re: Little help with routes and links

2012-05-16 Thread Confused Dev
Thanks guys for all your tips... I couldn't wrap my head around http://book.cakephp.org/2.0/en/development/routing.html but now it's all clear... :) I ended up using lowpass solution and it all works great so thanks again... -- Our newest site for the community: CakePHP Video Tutorials

Re: Little help with routes and links

2012-05-09 Thread lowpass
confused.de...@gmail.com wrote: Hello. I need help with defining some unusual routes. Here are my 2 tables Colors and Products: mysql select * from colors; ++--+ | id | name | ++--+ |  1 | blue | ++--+ mysql select * from products; ++--+--+ | id

Little help with routes and links

2012-05-08 Thread Confused Dev
Hello. I need help with defining some unusual routes. Here are my 2 tables Colors and Products: mysql select * from colors; ++--+ | id | name | ++--+ | 1 | blue | ++--+ mysql select * from products; ++--+--+ | id | name | color_id

Re: Little help with routes and links

2012-05-08 Thread Michael Stelly
I'm not an expert on routes, either. But I would start here to find out.Routing Cookbook v2http://book.cakephp.org/2.0/en/development/routing.html Sincerely, Michael Stelly mobile: +1.918.978.2000 skype: mjstelly LinkedIn http://www.linkedin.com/in/mstelly On Tue, May 8, 2012 at 7:26 AM

Re: Little help with routes and links

2012-05-08 Thread Mike Griffin
On Tue, May 8, 2012 at 1:26 PM, Confused Dev confused.de...@gmail.com wrote: Hello. I'd like to have links like this: http://example.com/items/blue/bowl/1 I don't even know where to begin to make it produce automatic links like that. Any help would be greatly appreciated. You could try

Re: Little help with routes and links

2012-05-08 Thread Jeremy Burns | Class Outfit
Can you throw some background on what you are trying to achieve (why these links?)? Jeremy Burns Class Outfit http://www.classoutfit.com On 8 May 2012, at 14:29:16, Mike Griffin wrote: On Tue, May 8, 2012 at 1:26 PM, Confused Dev confused.de...@gmail.com wrote: Hello. I'd like to have

Routes to catch complete querystring

2012-04-09 Thread heohni
Hi, depening of used search criterias it can happen that I want to call this url: '/search/cat:10/city:6/sleeps:4/price:3/' But it can be also just '/search/cat:10/city:6/price:3/' or '/search/city:6/sleeps:4/price:3/' or any other combination... That means, I need to have a route what

Re: Routes to catch complete querystring

2012-04-09 Thread heohni
I just found this: Router::connect('/search/*', array('controller' = 'objekts', 'action' = 'search', Router::queryString($this-params['url']))); this returns me this error: *Notice* (8) javascript:void(0);: Undefined property: Dispatcher::$params [*APP\Config\routes.php*, line *48*] But it

cache helper isnt aware of routes?

2012-03-27 Thread K3
and is not aware of routes. Can anyone help me solve this issue or give me some tips? Thanks -- 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

How to make the routes working with CakePHP in a subdirectory

2012-03-01 Thread Optik Fluffel
, my other routes like domain.com/controller/action/id don't work either. -- 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

Re: How to make the routes working with CakePHP in a subdirectory

2012-03-01 Thread Optik Fluffel
only get a 404 =( Router::connect( '/login', array('controller' = 'users', 'action' = 'login')); Could you please help me? //edit: I just tried around a little bit, my other routes like domain.com/controller/action/id don't work either. -- Our newest site for the community: CakePHP

Cutom Routes

2012-01-04 Thread Waterschaats
When a Controller of Plugin isn't found. I want it to end at a specific controller that examines the ulr, and checks if there'r a page related to it in my cms. So, after the default cakephp routing I don't want the missing controller error but I want to route to a controller. How can I Accomplish

Re: Cutom Routes

2012-01-04 Thread DragonFlyEye
Waterschaats, Have a look at the Error Controller: http://book.cakephp.org/1.3/view/1188/Error-Handling For more information on the types of pre-existing errors - including the missingController error, have a look at the API:

Re: Cutom Routes

2012-01-04 Thread Waterschaats
Thanks this is usefull. Although I was thinking of accomplishing this with Routes. It feels a bit wrong to handle this with an error function. And is this performance wise the best option? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new

Re: Cutom Routes

2012-01-04 Thread Waterschaats
by the way. I'm using cakephp 2.0 (The error handling implementation has dramatically changed in 2.0) -- 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

Re: Cutom Routes

2012-01-04 Thread DragonFlyEye
Considering that this is the way CakePHP handles errors, yes, it is certainly the most efficient option on its face. Others may dispute that. I wouldn't really consider using Routes, because the routes are determined *before* the existence of any Controllers or Actions is confirmed. I do

Re: Cutom Routes

2012-01-04 Thread DragonFlyEye
Ah, well, then I'm out of my element, Donnie. (Sorry for the Big Lebowski reference). -- 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

Re: Cutom Routes

2012-01-04 Thread Waterschaats
Thanks, In case of using: Router::connect('/*', array('controller' = 'pages', 'action' = 'display')); I have to specifie all the controller I use. I don't want that. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

CakePHP creates wrong routes for reverse proxy

2011-11-15 Thread Steffen
Hello, My CakePHP application is accesible through a mod_alias rule in the apache config. Due to this fact its accesible on the root of the apache folder. For example: apps.example.com/app1/ The Application works without problems on this URL but it don't work for a reverse proxy. The reverse

Routes Problem

2011-10-19 Thread porangi.chris
Hi, I'm trying to create a custom route that matches the url used by a previous system to a new version written in cake. Basically I have urls that are domain.com/r/i/some-name and I'd like to match them to the categories - display action with two named parameters id and url. Id maybe null as

Re: Routes Problem

2011-10-19 Thread majna
Maybe Router::connectNamed(array('id', 'url')); before those routes? -- 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

uso de routes para modficar urls

2011-09-26 Thread c.pfar...@gmail.com
Hola gente, he visto en el book de cake el uso de routes para modficar la url con cosas simple, pero no he visto nada como modificar por ejemplo algo como esto: si mu ruta es /user/view/4 (Estaría viendo el user 4), lo tendría que dejar algo como: /user/view_user/nombre_de_usuario_31_may_1985

Login function and routes

2011-08-09 Thread nOLL
Hi, I have a project that required 3 group which are admin, agents and users. These group will using only one login page. In login page there are username,password and 2 radio button which are members(admin and agents) and user. After login, admin could view fully CMS and dashboard, agents could

Re: Login function and routes

2011-08-09 Thread Sam Sherlock
You don't need the radio buttons at all. http://cakephp.1045679.n5.nabble.com/CakeDC-Users-Plugin-redirect-based-on-role-td3410081.html(see sam bernards comments) http://www.packtpub.com/article/cakephp-authentication-setup-application(roles are mentioned later on) - S On 9 August 2011

Re: Login function and routes

2011-08-09 Thread Mohd Hasnol
Thanks Sam. On Wed, Aug 10, 2011 at 12:53 AM, Sam Sherlock sam.sherl...@gmail.comwrote: You don't need the radio buttons at all. http://cakephp.1045679.n5.nabble.com/CakeDC-Users-Plugin-redirect-based-on-role-td3410081.html(see sam bernards comments)

Problem in config routes

2011-07-29 Thread taqman filler
hi I'm have noob question I try to create link to login page this $html-link('login',array('url'=array('controller'='users','action'='login'))) but output in 127.0.0.1/cakephp/user_articles/users/login how to config it thank taqman -- Our newest site for the community: CakePHP Video Tutorials

Re: Problem in config routes

2011-07-29 Thread Tilen Majerle
its $html-link('linkname', array('controller' = 'yourcontroller', 'action' = 'youraction')); -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/7/30 taqman filler taqman...@gmail.com hi I'm have noob question I try to create link to login page this

Routes, Rewrites such

2011-07-11 Thread TobyG
Hi all, I'm trying to get my head round the best way to use the same CakePHP App code for multiple clients, the best way I can think of is to have a client identifier at the beginning of the path for the app, use rewrites/custom routes to facilitate this. So far I have added the following rule

Re: Routes, Rewrites such

2011-07-11 Thread TobyG
I managed to get this working in the end. I got rid of the Rewrite Rule added the following rules to get this working... Router::connect('/:cid', array( 'controller' = 'events', 'action' = 'index' ), array( 'cid' = 'alika-bo', 'persist' =

custom routes slow down my application

2011-07-02 Thread me...@yahoo.com
custom routes slow down my application I have loop in the routes in which I'm connecting and processing more than 100 custom routes but now my app is experiencing hard time when is loading Render Controller Action 6600 ms Any suggestion how to resolve this -- Our newest site for the community

Re: custom routes slow down my application

2011-07-02 Thread John Hardy
It's a design issue with your application. There's no need to be instantiating 100's of routes for a single request. What you should do, is use a custom route class to bind the request to a controller/action. http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp On Jul 2

Ask about regex in routes rule .

2011-06-22 Thread Điển vũ
In routers.php , i wrote this line. Router::connect('/pages/:id/:slug', array('controller' = 'pages', 'action' = 'view'), array('pass' = array('id', 'slug'), 'id' = '[0-9A-Za-z]{6}')); now i can access http://example.com/pages/7hf763/this_is_slug but how i can access function public()

Reverse lookup of routes

2011-04-09 Thread ThunderTD
The custom route detailed in the CakePHP CookBook is working fine as long as it's used in one direction. Inside the routes.php file I'm using the following route: Router::connect('/:language/artists/:id', array('controller'='artists','action'='view'), array('pass' = array('id'), 'language' =

Re: Reverse lookup of routes

2011-04-09 Thread ThunderTD
similar to one example in the CakePHP Book. I want to reach the ArtistsController's view action via the URL http://xxx/artists/id. Everything is working fine with the following Routes entry and this direction: Router::connect('/:language/artists/:id', array('controller'='artists','action

Re: Reverse lookup of routes

2011-04-09 Thread ThunderTD
route similar to one example in the CakePHP Book. I want to reach the ArtistsController's view action via the URL http://xxx/artists/id. Everything is working fine with the following Routes entry and this direction: Router::connect('/:language/artists/:id', array('controller'='artists

Re: Reverse lookup of routes

2011-04-09 Thread cricket
On Sat, Apr 9, 2011 at 3:27 AM, ThunderTD alexfestb...@googlemail.com wrote: The custom route detailed in the CakePHP CookBook is working fine as long as it's used in one direction. Inside the routes.php file I'm using the following route: Router::connect('/:language/artists/:id',

Reverse lookup of routes

2011-04-07 Thread ThunderTD
I configured my route similar to one example in the CakePHP Book. I want to reach the ArtistsController's view action via the URL http://xxx/artists/id. Everything is working fine with the following Routes entry and this direction: Router::connect('/:language/artists/:id', array('controller

Re: Reverse lookup of routes

2011-04-07 Thread Ryan Schmidt
On Apr 7, 2011, at 12:42, ThunderTD wrote: I configured my route similar to one example in the CakePHP Book. I want to reach the ArtistsController's view action via the URL http://xxx/artists/id. Everything is working fine with the following Routes entry and this direction: Router

CakeDC Users plugin - routes issue

2011-02-17 Thread designv...@gmail.com
Hi there there, I have integrated the CakeDC Users plugin fine and it all works out of the box, however I want to uses some neater routes for the login,register,dashboard actions but adding the following route: Router::connect('/login', array('plugin' = 'users','controller' = 'users', 'action

Re: CakeDC Users plugin - routes issue

2011-02-17 Thread cricket
On Thu, Feb 17, 2011 at 7:02 AM, designv...@gmail.com designv...@gmail.com wrote: Hi there there, I have integrated the CakeDC Users plugin fine and it all works out of the box, however I want to uses some neater routes for the login,register,dashboard actions but adding the following route

Re: Help on Routes, should we use it ?

2010-12-31 Thread John Maxim
/view/1541/Routes I don't understand. What does it accomplish ?? Do we normally change the route as shown from the link above ? Cake's routes default to: /controller/action/param So, if you had a BookController, to view a specific Book, you'd have something like: /books/view/42

Help on Routes, should we use it ?

2010-12-28 Thread John Maxim
Refer to link below: http://book.cakephp.org/view/1541/Routes I don't understand. What does it accomplish ?? Do we normally change the route as shown from the link above ? Thanks, Maxim J. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related

Re: Help on Routes, should we use it ?

2010-12-28 Thread Vivi Vivi
::connect('/testpage.html', array('controller' = 'pages', 'action' = 'check')); On Tue, Dec 28, 2010 at 5:14 PM, John Maxim goog...@gmail.com wrote: Refer to link below: http://book.cakephp.org/view/1541/Routes I don't understand. What does it accomplish ?? Do we normally change the route

Re: Help on Routes, should we use it ?

2010-12-28 Thread cricket
On Tue, Dec 28, 2010 at 10:14 AM, John Maxim goog...@gmail.com wrote: Refer to link below: http://book.cakephp.org/view/1541/Routes I don't understand. What does it accomplish ?? Do we normally change the route as shown from the link above ? Cake's routes default to: /controller/action

Form validation and routes - errors lead to controller/action instead of route!

2010-11-30 Thread DigitalDude
Hey, the problem I have came up very often the last weeks but I couldn't find a solution yet. Maybe one of you has a clue how to do this. The facts: in my users_controller i have an action called register, which is mapped to the route http:://www.domain.com/register This is working, and very

Re: Form validation and routes - errors lead to controller/action instead of route!

2010-11-30 Thread DigitalDude
Hey, ok I found the solution, and it's really simple. Just use the 'url' option for the form, and the routes will be no problem anymore. Here is a brief example how to do it: In Routes-PHP, there is an entry: Router::connect('/register', array('controller' = 'users', 'action' = 'register

Re: Doubt about admin routes / actions and Auth component

2010-11-14 Thread huoxito
');        $this-Auth-authError = Você precisa estar logado para entrar no sistema.;    } My routes config are: Router::connect(/admin/:controller/:action/*, array('prefix' = 'admin', 'admin' = true)); What version are you running? In 1.2.x you should have the following in core.php

Re: Doubt about admin routes / actions and Auth component

2010-11-13 Thread cricket
');        //$this-Auth-loginRedirect = array('controller' = 'usuarios', 'action' = 'afterLogin');        $this-Auth-authError = Você precisa estar logado para entrar no sistema.;    } My routes config are: Router::connect(/admin/:controller/:action/*, array('prefix' = 'admin', 'admin' = true

Re: Doubt about admin routes / actions and Auth component

2010-11-12 Thread cricket
On Thu, Nov 11, 2010 at 11:44 PM, huoxito huox...@gmail.com wrote: Thats what I thought as well, but it doesnt happen, If I just let $this-Auth-allow(‘*’) in my app_controller all actions are accessible without being logged in, even my admin_* methods Perhaps Auth isn't properly configured in

Re: Doubt about admin routes / actions and Auth component

2010-11-12 Thread huoxito
('admin' = false, 'controller' = 'users', 'action' = 'login'); //$this-Auth-loginRedirect = array('controller' = 'usuarios', 'action' = 'afterLogin'); $this-Auth-authError = Você precisa estar logado para entrar no sistema.; } My routes config are: Router::connect(/admin

Re: Doubt about admin routes / actions and Auth component

2010-11-11 Thread cricket
On Wed, Nov 10, 2010 at 10:26 PM, huoxito huox...@gmail.com wrote: found what i was looking for, guess I just had to add this condition, thanks to this post http://padariadodenilson.wordpress.com/2010/10/04/criando-uma-area-administrativa-com-cakephp/ if (isset($this-params['admin'])) {

  1   2   3   4   5   >