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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:28:11+00:00 2026-06-05T15:28:11+00:00

We have a Zend application that has these following modules: Users Shop etc… Front

  • 0

We have a Zend application that has these following modules:

Users
Shop
etc...
Front - A content management module

While the Front module has the following controllers:

UsersController
ShopController
AuthController
etc...

In the middle of our development cycle we decided to set the default module for the Zend application to the Front module, but inadvertently broke our links, as http://domain.com/front/users/list are now generated as http://domain.com/users/list, which is now pointing to the wrong action.

We are generating links using the URL view helper, (i.e. $this->url(array('module' => 'front', 'controller' => 'users', 'action' => 'list'));), but the ‘front’ URI segment is omitted since switching the default module to the Front module.

I totally understand why this is so, but we are avoiding renaming all controllers under the Front module to avoid conflicts.

My question is, is there is a way to instruct the URL view helper to always include the ‘front’ module URI segment even if it is already set as the default one?

  • 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-05T15:28:13+00:00Added an answer on June 5, 2026 at 3:28 pm

    My question is, is there is a way to instruct the URL view helper to
    always include the ‘front’ module URI segment even if it is already
    set as the default one?

    You can create your own url view helper with same name and override default url view helper add it to Zend_View object in your bootstrap.

       $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
        if (null === $viewRenderer->view) 
        {
            $viewRenderer->initView();
        }
    
        $view = $viewRenderer->view;
    
        $view->addHelperPath('/path/to/some/helpers', 'My_View_Helper');
    

    Now create class My_View_Helper_Url let it extend Zend_View_Helper_Url override url method.
    Here is reference form ZF doc about this procedure

    In fact, you can “stack” paths using the addHelperPath() method. As
    you add paths to the stack, Zend_View will look at the
    most-recently-added path for the requested helper class. This allows
    you to add to (or even override) the initial distribution of helpers
    with your own custom helpers.

    Having said that I think http://domain.com/users/list, should have worked correctly in first place since you have specified default module to front.

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

Sidebar

Related Questions

I have a Zend Framework (PHP) web application that has a table with a
I have an application in Zend Framework that has to run for a different
I ran across an interesting issue today. We have an application that utilizes Zend
So, I have created a Zend application following the quick start guide (so it
I have a PHP application that has grown in size. The database used to
I have a PHP application that is written with Zend Framework. It uses Phing
I have an application that has 3 level of data depth: list of presentations
I have a CMS application written using the Zend Framework that allows you to
I have a working zend mvc application that is using a layout, and this
I have a PHP MVC application using Zend Framework. As presented in the quickstart,

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.