Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7748747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:51:47+00:00 2026-06-01T10:51:47+00:00

I am using cakephp 1.3.X . I am experiencing some problem with url routing

  • 0

I am using cakephp 1.3.X . I am experiencing some problem with url routing and pagination

My URL will look like

http://project.dev/search/hamburg/place:1

Below is my Routing code

Router::connect('/search/:slug/*', array('controller' => 'searches', 'action' => 'index'));

Below is controller where I am coming to the search page

$this->redirect(array('controller'=>'searches','action'=>'index','slug'=>$slugUrl,$query));

My problem is when I go to the next page ,that won’t showing the place:1 , just linking to search/hamburg/page:2 ie. place is missing

My index.ctp paginator options are given below

$paginator->options = array(
                                       'url'=>array(
                                            'controller'=>'searches',
                                            'action'=>'index',
                                            'slug'=>$this->params['slug'],  


                                    ));

What going wrong with me. I’ve had searched a lot in cake articles , but nothing works for me. Please advise me

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:51:48+00:00Added an answer on June 1, 2026 at 10:51 am

    Add.

         Router::connectNamed(array('slug'));
    

    At the top of your router.php

    Or define third pass param in your route, to pass slug.

          Router::connect('/search/:slug/*', array('controller' => 'searches', 'action' => 'index'), array('pass'=>array('slug')));
    

    Update view

         $paginator->options = array('url' => 
           array_merge(array('slug' => $this->params['slug']), $this->passedArgs)
         );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using CakePHP 1.3 there are named parameters in the URL like .../name:value/... These are
I am using CakePHP framework with MySQL database and I have problem in saving
I just started using CakePHP for a small project. I have rails experience, and
I am using Cakephp and I would like to learn how to set a
So I using cakephp and using ajax to submit forms. In some cases it
Using CakePHP, I am finding that I'm duplicating some code between controller actions. I
I'm trying to implement something like Mark Story's Down for Maintenance page using CakePHP
Using CakePHP 1.3 I'm trying to save some data to a MySQL database. The
I am using cakephp with postgresql. Some of my tables are very large.When using
I am using cakephp 2.0 for developing a website. Site will contain only 2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.