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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:03:44+00:00 2026-05-11T03:03:44+00:00

the directory structure I’m trying to achieve would be this: application/default/views/layouts/layout.phtml application/default/views/scripts/index/index.phtml application/admin/views/layouts/layout.phtml application/admin/views/scripts/index/index.phtml

  • 0

the directory structure I’m trying to achieve would be this:

application/default/views/layouts/layout.phtml application/default/views/scripts/index/index.phtml application/admin/views/layouts/layout.phtml application/admin/views/scripts/index/index.phtml library/Zend config/config.ini public/index.php (bootstrap) 

but I can’t figure out how to let Zend find my layout.phtml in each of my modules.

in my bootstrap I have:

define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application/')); define('APPLICATION_ENVIRONMENT', 'testing');  //setup path to our library files set_include_path( APPLICATION_PATH . '/../library' . PATH_SEPARATOR .                   get_include_path() );  //register the autoloader require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload();   //set config in the registry $config = new Zend_Config_Ini( APPLICATION_PATH . '/../config/config.ini', APPLICATION_ENVIRONMENT );  Zend_Registry::set('config', $config);  //setup logging $writer = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../log/debug.log'); $logger = new Zend_Log($writer); Zend_Registry::set('logger', $logger);  //run! $frontController = Zend_Controller_Front::getInstance(); $frontController->addModuleDirectory(APPLICATION_PATH); //initialize Zend_Layout's MVC helpers Zend_Layout::startMvc();  $frontController->throwExceptions(true);  try {          Zend_Controller_Front::getInstance()->dispatch();  } catch (Exception $exception) {          echo '<html><body><center>'  . 'An exception occured while dispatching the front controller.';      if (defined('APPLICATION_ENVIRONMENT') && APPLICATION_ENVIRONMENT != 'production'  ) {         echo '<br /><br />' . $exception->getMessage() . '<br />'  . '<div align="left">Stack Trace:' . '<pre>' . $exception->getTraceAsString() . '</pre></div>';      }     echo '</center></body></html>';     exit(1); } 

Where am I going wrong?

Update:

I haven’t looked at this in a long time, so the accepted solution may not be up-to-date. If anyone wants to post a more up-to-date solution to this question (i.e. ZF 1.8+), please do so! It would be helpful to others who are looking for a solution to this.

  • 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. 2026-05-11T03:03:45+00:00Added an answer on May 11, 2026 at 3:03 am

    You should check out Per Module Zend_Layout, in this article, the author covers exactly what you are trying to achieve. His methodology is to write a plugin for the front controller that handles layout registration.

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

Sidebar

Related Questions

Assuming the following directory structure, htdocs/ images/ css/ .htaccess system/ index.php ... I would
I am trying to determine the best directory structure of my application i have:
Imagine this directory structure: app/ __init__.py sub1/ __init__.py mod1.py sub2/ __init__.py mod2.py I'm coding
For this directory structure: . |-- README.txt |-- firstlevel.rb `-- lib |-- models |
How would you lay out the directory structure for a large C# solution, consisting
I have a directory structure like the following; script.php inc/include1.php inc/include2.php objects/object1.php objects/object2.php soap/soap.php
here is my directory structure. /user/a /user/b /user/b inside folder a,b,c there is a
Consider the following subversion directory structure /dir1/file.txt /dir2/file.txt I want to move the file.txt
I've been attempting move a directory structure from one location to another in Subversion,

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.