ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

Open-Source CRM software Forums OroPlatform OroPlatform – Programming Questions datagrid.yml – pass parameters to template

This topic contains 4 replies, has 3 voices, and was last updated by  jakabadambalazs 2 years, 3 months ago.

  • Creator
    Topic
  • #7411

    jakabadambalazs
    Participant

    Would it be possible to pass parameters to a twig template when rendering a datagrid column like:


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #7413
    ignat
    ignat
    Oro Core

    Hi,

    There is an option “context” where you can place any additional variables. Check this https://github.com/orocrm/platform/blob/1.4/src/Oro/Bundle/DataGridBundle/Extension/Formatter/Property/TwigTemplateProperty.php#L53. So in your case column config will be next:

    Thanks,
    Ignat

    #7427

    jakabadambalazs
    Participant

    Thanks @ignat – it works ;)!


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    #7431

    Alexandr Smaga
    Participant

    Hi ! Here is some documentation for twig property.

    #7454

    jakabadambalazs
    Participant

    Tnx, very useful.


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.