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

Skip to content

How to sort blocks in sections #113

@ambroisemaupate

Description

@ambroisemaupate

I use sections to create a kind of block collection (for carousels) but I need them to be sorted using a dedicated position field.

For example, create a homepage-carousel section then add many BlockImage into it. How do you sort them?

{{ render(path('bitbag_sylius_cms_plugin_shop_block_index_by_section_code', {
    'sectionCode' : 'home-carousel', 
    'template' : '@SyliusShop/Homepage/_carousel.html.twig',
    'sort': { 'position': 'ASC' }
})) }}

Is it possible to extend Block entity to add position and Gedmo Sortable behaviour ?

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