Documentation · ViewHelper reference

GridViewHelper

Grid container ViewHelper.

Use <flux:grid.row> with nested <flux:grid.column> tags to define a tablular layout.

The grid is then rendered automatically in the preview section of the content element, or as page columns if used in page templates.

For frontend rendering, use flux:content.render.

Content elements

Use the name and area attributes.

Grid for a two-column container element

<flux:grid>
    <flux:grid.row>
        <flux:grid.column name="left" />
        <flux:grid.column name="right" />
    </flux:grid.row>
</flux:grid>

Container element frontend rendering

<flux:content.render area="left" />
<flux:content.render area="right" />

Pages

Use the colPos and column attributes.

<flux:grid>
    <flux:grid.row>
        <flux:grid.column colPos="0" name="Main" colspan="3" style="width: 75%" />
        <flux:grid.column colPos="1" name="Secondary" colspan="1" style="width: 25%" />
    </flux:grid.row>
</flux:grid>

Page rendering

<v:content.render column="0" />
<v:content.render column="1" />

/

  • Tag usage example

    <flux:grid name="'grid'" label="NULL" variables="{foo: 'bar'}">
    	<!-- tag content - may be ignored! -->
    </flux:grid>
  • Inline usage example

    {flux:grid(name: ''grid'', label: 'NULL', variables: {foo: 'bar'})}

Arguments

Argument Description Type
label

Optional label for this grid - defaults to an LLL value (reported if it is missing)

string
name

Optional name of this grid - defaults to "grid"

string
variables

Freestyle variables which become assigned to the resulting Component - can then be read from that Component outside this Fluid template and in other templates using the Form object from this template

array
Required attribute

Revision history

commit 3390bd05f546bccfc9ca5cb012d291f7bdd63512
Author: Claus Due <*****@namelesscoder.net>
Date:   Mon Dec 2 23:26:43 2013 +0100

    [TASK] Rename ViewHelpers
    
    Renames:
    
    flux:flexform -> flux:form
    flux:flexform.field.* -> flux:field.*
    flux:flexform.field.wizard -> flux:wizard.*
    flux:flexform.* -> flux:form.*

commit 3878c943a6eb0924bb6db2e5ed8461580896431f
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 10 01:59:34 2013 +0100

    [TASK] Update copyright and author tags
    
    Assumes "Claus Due" as author whenever no author is specified.

commit b37dbbd83d210d12d1f0b2517b06818225ea3608
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 17 17:30:12 2013 +0100

    [FEATURE] Storage of custom variables on FormComponents
    
    This allows a "variables" property to be used on every Form component and ViewHelper. Setting an array of variables here, makes those variables available anywhere the Form object is available.
    
    Can, for example, be used to store custom rendering instructions for the Preview section as described in #411

commit 8bf2b5beb89c7d72a41230f152d9a5a3d308ba84
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:11:00 2013 +0100

    [TASK] Happy new year!

commit b9f2002bf6eda3fb28558b5dd8c875464e8b3c25
Author: G. Bodenschatz <*****@46halbe.de>
Date:   Wed Sep 17 00:43:56 2014 +0200

    [TASK] Remove unnecessary and unused aliases