开发者

Symfony Templates within Templates

开发者 https://www.devze.com 2023-02-09 06:21 出处:网络
Sorry if this seems incredibly simple. I am only new to Symfony. I just want to have a template/view which \"contains\" other views. So, for the following example, imagine on my /dashboard/ it will s

Sorry if this seems incredibly simple. I am only new to Symfony.

I just want to have a template/view which "contains" other views. So, for the following example, imagine on my /dashboard/ it will show both "statistics" and "inbox". I want the code for each of these to be within separate actions/methods.

<?php

class dashboardActions extends sfActions
{
    public function executeIndex(sfWebRequest $request) {
        // Load statisticsSuccess
       开发者_JAVA技巧 // Load inboxSuccess

        // Render them both "within" index template
    }

    public function executeStatistics(sfWebRequest $request) {
        // Render statisticsSuccess
    }

    public function executeInbox(sfWebRequest $request) {
        // Render inboxSuccess
    }
}

Thanks for any assistance you can provide!


Make "statistics" and "inbox" components. Be sure to reference the documentation of the version of Symfony you're using.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号