Bây giờ các mô-đun liên lạc được tạo ra, bạn cần phải cấu hình ứng dụng của bạn để tải nó. Điều này đòi hỏi hai điều, bạn cần phải cập nhật các tập tin cấu hình ứng dụng chính và tạo ra một tập tin tải khởi động cho các mô-đun liên lạc. Để bắt đầu, mở các tập tin cấu hình (ứng dụng / configs / ) | CHAPTER 10 EXTENDING YOUR CMS public function indexAction Next you need to add a directory to the module s view directory for the index controller s views named index. Then add a new file to this directory named . Add a headline to the page for now as shown in Listing 10-3. You will add the actual contact form to this page shortly. Listing 10-3. The Default Contact Module Page in application modules contact views scripts index h2 Contact Us h2 Configuring Your Application to Load Modules Now that the contact module is created you need to configure your application to load it. This requires two things you need to update the main application configuration file and create a bootstrap file for the contact module. To get started open the configuration file application configs . First set the front controller s module directory to modules. Once this is set the front controller will automatically load each of the modules that are in this directory. Next set the module resource to an empty array. Then you need to override the setting you added earlier where you set the default controller to page. Set this back to index. Listing 10-4 shows the three lines you need to add. Listing 10-4. The Updates You Need to Make to application configs APPLICATION_PATH modules index The last step of configuring your module is to bootstrap it. If your module has a file named in its root with a class named Module _Bootstrap then Zend_Application will use this file to bootstrap your module. In the contact form s case there is not a lot of custom configuration required it needs only to reset the defaultControllerName. It will do this automatically since you set it in the configuration file. Create a new file in the root of your contact module named . Add a class to this file named Contact_Bootstrap