Create static pages in SonataAdminBundle

305 views
Skip to first unread message

Reynier Pérez Mira

unread,
Nov 26, 2013, 8:51:59 PM11/26/13
to sonata...@googlegroups.com
I'm need to show some reports at backend/admin side. Since I'm using SonataAdmin is there any way to do this? I mean I have my Bundle at PICommonBundle and there is the logic and views and the rest of things, can I add this easily to Sonata Backend, how?

Cassiano Tartari

unread,
Nov 27, 2013, 5:16:26 AM11/27/13
to sonata-users
Could you be more specific ?

The default action when you click in a item from top menu is listAction, you could override it to show your template

Cassiano Valle Tartari
MSc. Computer Engineer

Tel: +55.48.84474818
Email: fal...@cassianotartari.eng.br
Site: http://www.cassianotartari.eng.br

QR Code


On Tue, Nov 26, 2013 at 11:51 PM, Reynier Pérez Mira <reyn...@gmail.com> wrote:
I'm need to show some reports at backend/admin side. Since I'm using SonataAdmin is there any way to do this? I mean I have my Bundle at PICommonBundle and there is the logic and views and the rest of things, can I add this easily to Sonata Backend, how?

--
You received this message because you are subscribed to the Google Groups "sonata-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonata-users...@googlegroups.com.
To post to this group, send email to sonata...@googlegroups.com.
Visit this group at http://groups.google.com/group/sonata-users.
For more options, visit https://groups.google.com/groups/opt_out.

reyn...@gmail.com

unread,
Nov 27, 2013, 6:22:58 AM11/27/13
to sonata...@googlegroups.com
Hi, ok see I have a CommonBundle with my own actions, lets say listAction, indexAction and so on. The indexAction for example made some QueryBuilder, get some data and display a template, this use PHPExcel to export data and another Bundle to handle OBHighCharts. I need to create a menu in the dashboard to access that CommonBundle:indexAction, also the same menu should goes in TopBar and of course when I click that link I should display the related  Controller and Template, this is what I'm trying to do, any help?

Reynier Perez Mira
eMail: reyn...@gmail.com, ad...@reynierpm.com
Website: http://www.reynierpm.com
Skype: reynierpm
Mobile: +58 424-180.56.09

Cassiano Tartari

unread,
Nov 27, 2013, 6:36:33 AM11/27/13
to sonata-users
I didn't stop yet to see this bundle but it can help you.

Or you can try in different ways:

1) Override the menu composition vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Resources/views/standard_layout.html.twig (sonata_nav_menu block) in app/Resources

2) You can write an admin class an add routes with for example:
    protected function configureRoutes(RouteCollection $collection) {
        $collection->add('another_action', $this->getRouterIdParameter() . '/another-action');
    }
3) You can override templates from default actions with for example:
    public function configure() {
        $this->setTemplate('list', 'CompanyMyBundle:CRUD:own_list.html.twig');
    }


Cassiano Valle Tartari
MSc. Computer Engineer

Tel: +55.48.84474818
Email: fal...@cassianotartari.eng.br
Site: http://www.cassianotartari.eng.br

QR Code


Reply all
Reply to author
Forward
0 new messages