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

  • SEARCH
  • Home
  • 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 8706835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:42:53+00:00 2026-06-13T03:42:53+00:00

I am building a website with Zend Framework but I’m very new at it

  • 0

I am building a website with Zend Framework but I’m very new at it and still don’t really get it.

I have a URL like:

http://localhost/public/directory/category/catid/art

What I want is to create a route for the URLto look like:

 http://localhost/public/directory/category/art

I have done simple routes like:

$frontController = Zend_Controller_Front::getInstance();
$router = $frontController->getRouter();

// TERMNS  ROUTE
$route = new Zend_Controller_Router_Route_Static(
   'termns',
    array('controller' => 'Index', 'action' => 'termns')
);

$router->addRoute('terms', $route);

Is there a way, building on that for me to control the other routes? Thanks!

  • 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-13T03:42:55+00:00Added an answer on June 13, 2026 at 3:42 am

    From category/catid/art to category/art.
    Add this method to your Bootstrap.php:

    protected  function _initRouter()
    {
        $router = Zend_Controller_Front::getInstance()->getRouter();
        $router->addRoute('category/:catid', new Zend_Controller_Router_Route('category/:catid',array(
            'module'     => 'default',
            'controller' => 'category',
            'action'     => 'index' // Check your action and controller
    ));
    

    And in controller’s action for category/testid you can use $this->_getParam('catid') for getting testid.

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

Sidebar

Related Questions

Building a website (I'm new to web and Scala and Playframework but have a
I'm building a website using Zend Framework and having trouble implementing modules and custom
Building a website. When I order my tags like this, LightCycle works but Lightbox
I am building a website to capture data. I have many spreadsheets that are
I am building a website using php and mysql.I have a login that is
I'm building a website and having some problem. if the HTML code is like:
Building a website using a PHP based Ecommerce product Magento. The problem I have
I'm building a website in Wordpress and I have a couple of selectboxes that
I am building a website to show my jewelry pieces. I have images without
Am building a website which will have articles, policies and laws and text stuffs.

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.