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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:46:33+00:00 2026-05-14T01:46:33+00:00

Ive got a url: http://dev.local/foodies/view?id=bluedaniel and ive got in my bootstrap: protected function _initRoute()

  • 0

Ive got a url: http://dev.local/foodies/view?id=bluedaniel

and ive got in my bootstrap:

protected function _initRoute() {
        $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/routes.ini', 'production');
        $router = new Zend_Controller_Router_Rewrite();
        $router->addConfig($config, 'resources');
    }

and
ive also got in my routes.ini:

[production]
resources.router.routes.foodies_view.route = ":foodies/:id"
resources.router.routes.foodies_view.defaults.module = "foodies"
resources.router.routes.foodies_view.defaults.controller = "view"
resources.router.routes.foodies_view.defaults.action = "index"

so http://dev.local/foodies/bluedaniel should work right?

I get a Resource ‘foodies:bluedaniel’ not found error however with this setup

————— UPDATE —————-

Instead of the above I added the following to the application.ini file:

resources.router.routes.myroute.route = "foodies/:id"
resources.router.routes.myroute.defaults.module = "foodies"
resources.router.routes.myroute.defaults.controller = "view"
resources.router.routes.myroute.defaults.action = "index"
resources.router.routes.myroute.defaults.id = "\w+"

This method now works although I would still prefer the routes in their seperate ini file if I can help it.

  • 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-14T01:46:33+00:00Added an answer on May 14, 2026 at 1:46 am

    If anyone is interested, I have solved the problem, now in my bootstrap:

    protected function _initRoutes() {
        $router = Zend_Controller_Front::getInstance()->getRouter();
        $router->addRoute('userprofile', new Zend_Controller_Router_Route('user/:id/', array('module' => 'foodies', 'controller' => 'view', 'action' => 'index', 'id'=>'\w+')));
    }
    

    The problem was that in my navigation.xml I needed to add <route>default</route> to every node. Zend documentation can be very very poor indeed at times.

    I also needed to declare a default variable for id otherwise it wouldnt recognise it being passed.

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

Sidebar

Related Questions

All, I've got the following url: http://tinyurl.com/7fsbuhz If you click on the Event Type
All, I've got the following code: var site_url = 'http://localhost/website/'; jQuery(#cancel_song_choice).click(function(event){ cancel_url = site_url
Im really really new to Javascript but Ive got this script that loads the
I've got an url http://www.example.com/?req=welcome . To get the parameter req I use PHP
I've got the URL http://localhost:xyz/HelloWorld , which directs to the HelloWorld action in the
I've got the following object: $json = '{response: {status: {message: Success}, images: [{url: http://domain.com/images/0001.jpg},
Take a look at: http://groups.google.com/group/android-beginners/msg/61802d28a8335809 ive done that a got it to work but
I've got an URL's like this: http://localhost/adminator/index.php?section=1portal&tool=2firmy and http://localhost/adminator/index.php?section=1portal&tool=2firmy&passedID=26 and I want to be
I've got a URL and I'm using HTTP GET to pass a query along
I wrote this code: function json() { var url=http://192.172.2.23:8080/geoserver/wfs?request=GetFeature&version=1.1.0&outputFormat=json&typeName=topp:networkcoverage&CQL_FILTER= topp:CELL_ID='410-07-301-31781' Or topp:CELL_ID='nnn'&callback=?; jQuery.getJSON(url,function(data){alert(Symbol: +

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.