Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] - add template layout chooser #123

Merged
merged 1 commit into from Feb 19, 2018
Merged

[FEATURE] - add template layout chooser #123

merged 1 commit into from Feb 19, 2018

Conversation

waldhacker1
Copy link
Contributor

Usage:

Add your custom template layout select items within the plugin settings:

    TCEFORM {
        tt_content {
            pi_flexform.ke_search_pi1.view.templateLayout.addItems {
                20 = Custom search box 1
            }
        }
    }

Register your own template paths:

    plugin.tx_kesearch_pi1 {
        templateRootPaths {
            5 = EXT:your_site_package/Resources/Private/Templates/KeSearch/
        }
        partialRootPaths {
            5 = EXT:your_site_package/Resources/Private/Partials/KeSearch/
        }
    }

EXT:your_site_package/Resources/Private/Templates/KeSearch/SearchForm.html:

    <f:layout name="General"/>
    <f:section name="content">
        <f:if condition="{conf.templateLayout}">
            <f:if condition="{conf.templateLayout} == 10">
                <f:render section="defaultLayout" arguments="{_all}"/>
            </f:if>
            <f:if condition="{conf.templateLayout} == 20">
                <f:render section="customLayout" arguments="{_all}"/>
            </f:if>
        </f:if>
    </f:section>

    <f:section name="defaultLayout">
        ... default template code
    </f:section>

    <f:section name="customLayout">
        ... custom template code
    </f:section>

@christianbltr christianbltr merged commit 2cbfb56 into teaminmedias-pluswerk:master Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants