タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

zend frameworkとsmartyに関するwdr_sのブックマーク (7)

  • The best Smarty + Zend View Helpers solution! | CodeUtopia

    Originally posted in my old blog at My Opera Coming on again with the Smarty and Zend View related articles, let's this time take a look at how to get Zend's View Helpers running with Smarty. Other examples for this that I have seen use a syntax like this: {helper helper=Url p='array(something)' p2=stuff}, which is kind of ugly and the array parsing is done with eval, and we know that Eval is Evil

  • Summing up Smarty and Zend View | CodeUtopia

    I’ve posted a couple of posts related to integrating Smarty with the Zend Framework: Making a Smarty view class based on Zend_View Integrating Zend View Helpers into Smarty I’ve also posted some Zend_View related posts: Using layouts with the Zend ViewRenderer helper Creating a factory-object for building views Let’s wrap up these in a summary of using them and what else could be done regarding th

  • Zend_Layout で Smarty を使う - Memo

    Zend Framework 1.5 PR の Zend_Layout をいじくる続き。 デフォルトの Zend_View を使用して Zend_Layout で表示できるのを確認したので、 今度はビューオブジェクトに Smarty を使用してみる。 19.4.1. ビューオブジェクトのカスタマイズ Zend_Layout では、 Zend_View_Interface を実装した任意のクラスや Zend_View_Abstract を継承した任意のクラスを用いて レイアウトスクリプトをレンダリングすることができます。 独自のビューオブジェクトを単純に constructor/startMvc() のパラメータとして渡すか、 あるいはアクセサ setView() で設定します。 http://framework.zend.com/manual/ja/zend.layout.advanced

    Zend_Layout で Smarty を使う - Memo
  • Zend_Layout で Smarty を使う 2 - Memo

    Zend_Layout で Smarty を使う - Memo の続き。 Layout の表示はできたが、コンテンツとなるページが表示されなかった。 コンテンツのテンプレートは Zend_Controller_Action_HelperBroker::addHelper($viewRender); を使って、自動的に読み込まれる。 Zend_View を使った場合は、 <?php $this->layout()->content ?> とすれば、コンテンツが表示された。 Smarty も同じように、 {$layout.content} とかすれば出来ると思ったけど、Layout のテンプレートに content がアサインされていない。 ドキュメントを読むと以下のように書いてあった。 Zend_View の実装がすべて同じというわけではない Zend_Layout では Zend_View

    Zend_Layout で Smarty を使う 2 - Memo
  • Zend Frameworkについて(View編3):なまはげ カンタービレ:So-net blog

    今回はZend_Viewに別テンプレートエンジンを組み込む方法について。 マニュアルでは18.3.2からです。 マニュアルによると別テンプレートエンジンを組み込むには、 ビュースクリプトを使う方法と「Zend_View_Interface」を使う方法の2つが紹介されているが、 ビュースクリプトを使う方法がどうもうまく動かないので、 今回は「Zend_View_Interface」を使う方法を取り上げてみる。 「Zend_View_Interface」を使い他のテンプレートエンジンを利用する 組み込んでみるテンプレートエンジンはおなじみのSmarty。 ちょうどマニュアルの18.3.2.2にSmartyを利用するためのラッパークラスのサンプルが乗っているので、 おぉこれは楽だ!と言う事でサンプルを利用してやってみる。 ・・・動かん。 って、よく見たらコンパイルしたテンプレートの

  • とれっくかいはつ » Zend Framework:テンプレートエンジンをSmartyにする

    Zend_Controllerを使ったWebアプリケーションのテンプレートエンジンにSmartyを使用してみます。 「Zend Framework:Hello Worldを表示してみる」のように"Hello World"を表示します。 ディレクトリ構成 ディレクトリ構成は、だいたい次のようにしています。 BASEDIR/ html/ .htaccess index.php lib ZendFramework ZendFramework-1.0.1/ webapp/ modules/ default/ controllers/ templates/ temporary cache templates_c BASEDIRは、ドキュメントルートの一個上のディレクトリです。 htmlは、ドキュメントルートです。 lib/ZendFrameworkは、lib/ZendFramework-1.0

  • Zend Framework 1.0でSmartyを使用する | プログラムの種 ブログ

    もちろん使用する、というのはView_Helperとして。楽ちんですからね。2007/07/20の最新バージョンである1.0.0で動作を確認しています。 Smarty用のZendViewはマニュアルに載っています。 別のテンプレートシステムの使用 これを保存して、 (ドキュメント上ではZend_View_Smartyとなっていますが、 Common_View_Smartyと変更しています) 起動ファイルで [php] require_once ‘Common/View/Smarty.php’; require_once ‘Zend/Controller/Action/Helper/ViewRenderer.php’; require_once ‘Zend/Controller/Action/HelperBroker.php’; $extraParams = array( ‘compile_

  • 1