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
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.*
--
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,
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
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
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
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
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)
-
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
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
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
]
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
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
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' =
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' =
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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]+));
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(
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
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',
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
Router::connect(
'/:slug',
array(
'controller' = 'categories',
'action' = 'view'
),
array(
'slug' = '[-a-z0-9]+',
'pass' = array('slug')
)
);
Router::connect(
'/:slug/:page',
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
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
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
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
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
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
('/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
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
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
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
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
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
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
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
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
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
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
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
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
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
, 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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
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)
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
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
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
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
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
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
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()
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' =
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
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
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',
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
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
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
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
/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
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
::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
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
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
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
');
$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
');
//$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
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
('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
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 - 100 of 468 matches
Mail list logo