zend framework - Using Zend_View->partial() in a regular PHP page -
i have component in php file. component displayed using zend_view->partial (with arguments). need use in legacy code, means regular (as in "non zend") php page. how can done?
note i'm using zend framework 1. have seen example want, zf2...
edit:
that's how partial called:
<?php $gendervalue = $this->element->stt_form_manager_gender->getvalue(); $genderlabel = is_null($gendervalue) ? '' : $this->element->stt_form_manager_gender->options[$gendervalue]; echo $this->partial('forms/sttsummary.phtml', array( 'shortname' => $this->element->stt_form_stt_name->getvalue(), 'sign' => $this->element->stt_form_stt_enseigne->getvalue(), 'manager' => ($this->element->stt_form_manager_last_name->getvalue() != null && $this->element->stt_form_manager_last_name->getvalue() !== "" ? $genderlabel . " " . $this->element->stt_form_manager_first_name->getvalue() . " " . $this->element->stt_form_manager_last_name->getvalue() : ""), 'address' => $this->element->getaddress(), 'status' => $this->element->getcurrentstatus(), 'activity' => ($this->element->stt_form_activity->getvalue() == "active" ? "actif" : "inactif"), 'supactivity' => ($this->element->stt_form_sup_activity->getvalue() == "active" ? "actif" : "inactif"), 'color' => ($this->element->stt_form_activity->getvalue() == "active" ? "sttframeactive" : "sttframeinactive"), 'docs' => $this->element->getdocs() )); ?>
and that's sttsummary itself:
<?php $this->headlink()->appendstylesheet('/css/stt_summary.css'); ?> <div id="sttsummary" class="<?php echo $this->color ?>"> <div class="sttleft"> <div class="stticon"><img src="/images/repo/stt.gif"></div> </div> <div class="sttmiddle"> <div id="sumshortname" class="sttshortname"><?php echo $this->shortname ?></div> <div id="sumsign" class="sttsign"><?php echo $this->sign ?></div> <div id="summanager" class="sttmanager"><?php echo $this->manager ?></div> <div id="sumaddress" class="sttaddress"><?php echo $this->address ?></div> </div> <div class="sttright"> <div id="sumstatus" class="sttstatus"><?php echo $this->status ?></div> <div id="sumactivity" class="sttactivity"><?php echo $this->activity ?></div> <div id="sumdocs" class="sttdocs"><?php echo $this->docs ?></div> <div id="sumlsupact" class="sttsupactivity">l. sup: <?php echo $this->supactivity ?></div> </div> </div>
i have found zf2 code here, obviously, doesn't work: http://comments.gmane.org/gmane.comp.php.zend.framework.general/41404
Comments
Post a Comment