sulu / SuluHeadlessBundle

Bundle that provides controllers and services for using Sulu as headless content management system
MIT License
45 stars 25 forks source link

Use ContentMapper service for loading pages in PageSelectionResolver #39

Closed niklasnatter closed 4 years ago

niklasnatter commented 4 years ago

At the moment, the PageSelectionResolver uses the PageSelectionContainer of sulu for loading the data of the selected pages. Unfortunately, the PageSelectionContainer already resolves the properties of the page with the default content-types of Sulu. We want to prevent this because we want to resolve the data with the headless resolvers of this bundle.

Template properties for testing resolving of properties:

        <property name="page_selection" type="page_selection">
            <meta>
                <title lang="en">Page Selection</title>
                <title lang="de">Seiten</title>
            </meta>

            <params>
                <param name="properties" type="collection">
                    <param name="title" value="title"/>
                    <param name="excerptTitle" value="excerpt.title"/>
                    <param name="single_media_selection" value="single_media_selection"/>
                </param>
            </params>
        </property>

        <property name="single_media_selection" type="single_media_selection">
            <meta>
                <title lang="en">Single Media Selection</title>
                <title lang="de">Medium</title>
            </meta>
        </property>