2010-06-29 17 views
5

के बजाय प्रस्तुत करने के लिए कस्टम टेम्पलेट पथ सेट करें क्या यह कुछ क्रियाओं को कॉल करते समय कस्टम टेम्पलेट सेट करने के लिए ZendFramework में संभव है? उदाहरण के लिए मैं /category/show/id/123 और View पर कॉल करता हूं /category/show.html फ़ाइल प्रस्तुत करता है।मानक एक

मैं एक और टेम्पलेट प्रस्तुत करने में सक्षम होना चाहता हूं - /category/showOther.html

मुझे क्या करना चाहिए?

उत्तर

16

निश्चित रूप से। अपने controlleraction में ऐसा करते हैं:

$this->_helper->viewRenderer('showOther'); 
+0

वर्क्स एक आकर्षण की तरह। धन्यवाद ! – hsz

0
<div class="jumbotron"> 
    <h1><?php echo sprintf($this->translate('Welcome to %sZend Framework 2%s'), '<span class="zf-green">', '</span>') ?></h1> 
    <p><?php echo sprintf($this->translate('Congratulations! You have successfully installed the %sZF2 Skeleton Application%s. You are currently running Zend Framework version %s. This skeleton can serve as a simple starting point for you to begin building your application on ZF2.'), '<a href="https://github.com/zendframework/ZendSkeletonApplication" target="_blank">', '</a>', \Zend\Version\Version::VERSION) ?></p> 
    <p><a class="btn btn-success btn-lg" href="https://github.com/zendframework/zf2" target="_blank"><?php echo $this->translate('Fork Zend Framework 2 on GitHub') ?> &raquo;</a></p> 
</div> 

<div class="row"> 

    <div class="col-md-4"> 
     <div class="panel panel-default"> 
      <div class="panel-heading"> 
       <h3 class="panel-title"><?php echo $this->translate('Follow Development') ?></h3> 
      </div> 
      <div class="panel-body"> 
       <p><?php echo sprintf($this->translate('Zend Framework 2 is under active development. If you are interested in following the development of ZF2, there is a special ZF2 portal on the official Zend Framework website which provides links to the ZF2 %swiki%s, %sdev blog%s, %sissue tracker%s, and much more. This is a great resource for staying up to date with the latest developments!'), '<a href="http://framework.zend.com/wiki/display/ZFDEV2/Home">', '</a>', '<a href="http://framework.zend.com/zf2/blog">', '</a>', '<a href="https://github.com/zendframework/zf2/issues">', '</a>') ?></p> 
       <p><a class="btn btn-success pull-right" href="http://framework.zend.com/zf2" target="_blank"><?php echo $this->translate('ZF2 Development Portal') ?> &raquo;</a></p> 
      </div> 
     </div> 
    </div> 

    <div class="col-md-4"> 
     <div class="panel panel-default"> 
      <div class="panel-heading"> 
संबंधित मुद्दे