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

Ask A Question

Stats

  • Questions 157k
  • Answers 157k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try using multiple mouse cursors: http://www.microsoft.com/presspass/features/2006/dec06/12-14MultiPoint.mspx May 12, 2026 at 11:00 am
  • Editorial Team
    Editorial Team added an answer An excellent write-up on CPS in C# context was made… May 12, 2026 at 11:00 am
  • Editorial Team
    Editorial Team added an answer This page: http://erlang.org/doc/highlights.html ...lists hightlights of release 5.7/OTP R13A. Note… May 12, 2026 at 11:00 am

Related Questions

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
When I copy an Eclipse project directory, it contains the .classpath and .project files
How do I configure Apache to forward a URLa of a certain extension, say
I have a zip file which contains the following directory structure: dir1\dir2\dir3a dir1\dir2\dir3b I'm
I have a large number of files in a ClearCase directory structure, and I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.