I have attached a copy of my Sleek_View_Smarty class I wrote. Feel
free to rename it and use it for yourself. It works great for me. I
can render smarty templates no problem.

On 2/21/07, highland <[EMAIL PROTECTED]> wrote:

Hello

I does not work for me, i've made my view class from the code you provided
(edit only smarty paths), when i try to:
$view->assign('Title','test page');
$view->assign('main_data','main_site_data.tpl');
$this->_response->setBody($view->render('main_site_template.tpl'));

i receive my main_site_template.tpl template code: (instead of data):
{include file="header.tpl"}

<body id="top">
        <div id="wrapper">
            <div id="content">
                <div id="right">
                        {include file="$main_data"}
                        {include file="menu_top.tpl"}
                </div>
            {include file="menu_left.tpl"}
            <div id="topOfPage"> #top Top of page </div>
            {include file="logo.tpl"}
            {include file="footer.tpl"}
        </div>
    </body>
</html>


Why ?

> Hi,
>
> I'd like to recommend you implement Zend_View interface instead of
> extend the abstract class and the render method can be simply like this
> without any problem:
>
>  public function render($name)
>     {
>         return $this->_smarty->fetch($name);
>     }
>
> if you look into Smarty's source code, you will find the display() method
> calls fetch()
> and prints the output.
>
> Just my two cents.
>
> Jason.

I agree. It's much easier to implement the interface for a non-php based

My take:

http://akrabat.com/2006/12/23/extending-zend_view_interface-for-use-with-smarty/

Regards,

Rob...



--
View this message in context: 
http://www.nabble.com/Smarty-integration-tf3260325s16154.html#a9078402
Sent from the Zend Framework mailing list archive at Nabble.com.




--
Craig Slusher
[EMAIL PROTECTED]

Reply via email to