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 3227692
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:36:17+00:00 2026-05-17T16:36:17+00:00

how do i set up routing as follows these work with the standard routing

  • 0

how do i set up routing as follows

these work with the standard routing

/posts            => index action (listing)
/posts/view       => view action (individual post)
/posts/add        => add action
/posts/edit       => edit action

what abt these?

/posts can by filtered based on 1 or more query strings, in any order. eg.

/posts/tagged/tag1
/posts/tagged/tag1/timeframe/1w => fyi. 1w means 1 week
/posts/timeframe/1w/tagged/tag1 => can be in any order
/posts/sortby/dtposted => more options maybe added

how can i handle these? i tried

$route = new Zend_Controller_Router_Route(
    'posts/*',
    array(
        'controller' => 'posts',
        'action' => 'index'
    )
);
$router->addRoute('postsIndex', $route);

but of cos, all routes to posts/* goes to the index controller. not what i want

  • 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-05-17T16:36:17+00:00Added an answer on May 17, 2026 at 4:36 pm

    You dont need to use a route for those url’s if your using proper naming conventions it should naturally.

    class PostsController extends Zend_Controller_Action{
        public function viewAction(){
        }
        public function editAction(){
        }
        public function addAction(){
        }
        public function indexAction(){
        }
    }
    

    I suggest going back to basics and learning how controllers models and views work in the zend framework before trying to understand routing 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have actions SomethingEditor, SomethingDelete, SomethingSave, SomethingAdd and i want set these routing: site/Something/Editor,
I have routing set up as follows: void RegisterRoutes(RouteCollection routes) { routes.MapPageRoute(, Home, ~/Default.aspx);
My routing is set up like this: Route::set('default', '(<controller>(/<action>(/<id>)))') ->defaults(array( 'controller' => 'static', 'action'
I have to set some routing rules in my php application, and they should
How would you set up the routing in ASP.NET MVC in order to route
Set rs = conn.Execute(Statement) //rs has 6 fields I want to add the current
I have default routing set for my mvc application like: routes.MapRoute( Default, // Route
I have asp.mvc project. Currently routing is set to form following url's: site/school/45 site/school/45/courses
I'm using Kohana 3. Does anyone knows why param('controller') result is NULL. Routing: Route::set('default',
Is there any option to set a routing key at message level in Apache

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.