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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:33:51+00:00 2026-05-16T07:33:51+00:00

Very likely I’m going about this in the wrong way entirely. I’m completely new

  • 0

Very likely I’m going about this in the wrong way entirely. I’m completely new to the framework..

The site I am developing has two “parts” that are mainly separate. An informational/community half, and a commerce half. I’m using the following directory structure:

--application
----default
------controllers
------layouts
------models
------views
----store
------controllers
------layouts
------models
------views
--config
--library
--public

I would like to have a URL structure when browsing for products as follows:

/view/category/model/revision

This would pull up a specific product/revision – but I would like to back-track as well (browsing all revisions, all models, etc). I can’t figure out how to achieve this.. My route is setup like this:

Bootstrap.php

  $front = Zend_Controller_Front::getInstance();
  $router = $front->getRouter();
  $route = new Zend_Controller_Router_Route(
      'view/:cid/:sku/:rev',
      array('module' => 'store', 'controller' => 'index', 'action' => 'index')
  );
  $router->addRoute('view', $route);

This works fine for pulling up a specific product, but throws an exception (it reverts to the default module and complains that the controller ‘view’ does not exist) when leaving out any of the 3 labeled parameters. Is it possible to put in optional labels, where it would continue to use the view controller under the store module for 1-3 parameters? Am I missing the point?

I found nothing in the framework docs, but I wouldn’t be surprised if I just couldn’t find the page.. There’s something about the Zend Framework documentation that drives me crazy.

Thank You

  • 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-16T07:33:51+00:00Added an answer on May 16, 2026 at 7:33 am

    I’m not really a ZendFramework guy, but it’s obvious the missing parameters are causing the issue. Routes are matched in reverse order. Could it be passing a NULL value to the view when 3 parameters are passed and it is expecting 4?

    What if you tried something like:

    $route = new Zend_Controller_Router_Route(
          'view/:cid/:sku/:rev',
          array('module' => 'store', 'controller' => 'index', 'action' => 'index', 'cid' => 0, 'sku' => 0, 'rev' => 0)
      );
    

    It should pass default values if they are not provided.

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

Sidebar

Related Questions

I feel bad because it is very likely this has already been answered and
Okay this could very likely be a silly question. I am using Entity Framework
This very likely a setup issue on my part. I am trying to run
I'm somewhat new to OOP programming so it's very likely I'm making some stupid
Since in log4j javadoc is WARNING: This version of JDBCAppender is very likely to
Very new to python and can't understand why this isn't working. I have a
I'm by no means an experienced programmer. This task I have is very likely
This issue is very likely codeigniter specific. I have a controller called redirect.php that
--- THIS THREAD IS VERY LIKELY OUTDATED AS OF 2013 --- Is it worth
Edit: This is a decade old so very likely not to be relevant to

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.