Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add render block controller #42

@bitbager

Description

@bitbager

For now, we are rendering block through the Twig function. I think that making it with a custom controller would be more flexible as it can have an optional template parameter. Sometimes the default CMS Block templates are not enough. What I would like to achieve is I want it to be rendered like this: {{ render(path('bitbag_cms_render_block', {'code' : 'homepage_slide_1', 'template' : '@App/Cms/homepageSlide.html.twig'})) }} instead of {{ bitbag_render_block('homepage_slide_1') }}. Maybe it would be also a nice idea to allow an optional parameter to the bitbag_render_block function for a template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions