typo3fluxfedext

Section in fedext fluidpage


I'm trying to add a section into my fluidpage extension.

<f:section name="Configuration">
    <flux:flexform id="default" label="Gallery Page" icon="{f:uri.resource(path: 'Icons/DefaultPage.png')}">
        <flux:flexform.section name="images">
            <flux:flexform.field.file name="ls" label="Landscape image" maxItems="1" minItems="1" required="1" showThumbnails="1" />
            <flux:flexform.field.select name="lsAlign" label="Alignment of the landscape image" items="left,right" />
            <flux:flexform.field.file name="pt" label="Portrait image" maxItems="1" minItems="1" required="1" showThumbnails="1" />
            <flux:flexform.field.select name="ptAlign" label="Alignment of the portrait image" items="left,right" />
        </flux:flexform.section>

        <flux:flexform.grid>
            <flux:flexform.grid.row>
                <flux:flexform.grid.column colPos="0" name="Main Content" />
            </flux:flexform.grid.row>

            <flux:flexform.grid.row>
                <flux:flexform.grid.column colPos="1" name="Gallery Images" />
            </flux:flexform.grid.row>
        </flux:flexform.grid>
    </flux:flexform>
</f:section>

If I try this, the backend stays empty if I try top open page properties. As soon as I remove the section everything is fine. Also tried to put a felexform.object around the fields inside the section

<flux:flexform.section name="images" label="images">
            <flux:flexform.object name="imageObject" label="image object">
                <flux:flexform.field.file name="ls" label="Landscape image" maxItems="1" minItems="0" required="0"
                                          showThumbnails="1"/>
                <flux:flexform.field.select name="lsAlign" label="Alignment of the landscape image"
                                            items="left,right"/>
                <flux:flexform.field.file name="pt" label="Portrait image" maxItems="1" minItems="0" required="0"
                                          showThumbnails="1"/>
                <flux:flexform.field.select name="ptAlign" label="Alignment of the portrait image"
                                            items="left,right"/>
            </flux:flexform.object>
        </flux:flexform.section>

also no luck this was.

Markus


Solution

  • If you are currently previewing TYPO3 6.2 (current master branch, still unreleased at the time of writing this) then you may very well be experiencing this bug: http://forge.typo3.org/issues/56405

    If you are on TYPO3 6.1 then this feature should work and you should not be affected by the bug in the above link. I will assume in the rest of this response that you use 6.1 or that the bug in question is somehow fixed in your local repository, for example by reviewing the merge request linked to on that URL.

    You are a little unclear on which "section" you remove to restore the backend - if it is the f:section named Configuration you are removing, this will cause fluidpages to ignore the template. If it is the flux:flexform.section you are removing to get it working, there could be a few reasons for it failing:

    If you are affected to any of the first possible problems, errors will have been reported and placed either in your devlog (see the devlog extension), in your syslog (as configured in the TYPO3 install tool) or in your PHP error log (as configured by your web server or PHP settings). If you are unsure how to inspect these logs you may be able to read the same message by enabling "debug mode" in Flux's extension configuration (inside Extension Manager). Setting this value to "2" should ensure you only see errors, not general feedback messages. The error message may help you solve the problem - or you are welcome to add it to this question and I will take it into consideration in an edit.

    Finally, if you are expecting this Section and Object to be inherited to subpages you will be facing a blocker - this is simply not possible currently. The Object should be usable on the same page it is defined, but cannot be accessed on subpages (at least not without workarounds for example using Flux's data getting ViewHelper and manual page UID resolving).

    If you are blocked in this way, I suggest instead:

    Alternative:

    Hope this helps Markus - if not, feel free to add more precise information about your desired implementation.