Documentation · ViewHelper reference

VariableViewHelper

Fetches a single variable from the template variables /

  • Tag usage example

    <flux:variable name="NULL">
    	<!-- tag content - may be ignored! -->
    </flux:variable>
  • Inline usage example

    {flux:variable(name: 'NULL')}

Arguments

Argument Description Type
name

Name (dotted path supported) of template variable to get

string
Required attribute

Revision history

commit f3859f44bba93ed0cd1d6bbb8a9b98ccac25f275
Author: Claus Due <*****@wildside.dk>
Date:   Tue Mar 13 19:35:43 2012 +0100

    [FEATURE] Added Section Object ViewHelper
    
    Use this VH to divide sets of fields inside a Section into
    individual objects - each will be presented as a type of object
    that can be added to the Section.
    
    Example:
    
    <flux:flexform.section name="section" label="My section">
      <flux:flexform.object name="object1" label="Object type 1">
        <flux:flexform.field.input name="title" label="Title, type 1" />
      </flux:flexform.object>
      <flux:flexform.object name="object2" label="Object type 2">
        <flux:flexform.field.input name="title" label="Title, type 2" />
      </flux:flexform.object>
    </flux:flexform.section>
    
    Variable output example:
    
    section {
      object1 {
        title = Value entered as title
      }
      object1 {
        title = Another type 1 object
      }
      object2 {
        title = Here comes a different type object (note new index name)
      }
    }
    
    Change-Id: I5d840b8229f22a251bc22473bca872c42f8c2d2b
    Resolves: #34802

commit 64f9685401601d7ae6a00f025398a9ab141f7dd7
Author: Claus Due <*****@wildside.dk>
Date:   Wed Jul 25 20:23:48 2012 +0200

    [TASK] Migration to FieldProvider pattern
    
    Changes the internal logic that is rendering FlexForm structures
    from the previous XML-to-TCA to a direct TCA approach.
    
    Briefly described this change...
    
    * Completely removes the intermediate XML step and all XML templates
    * Removes all partial templates previously used to render field XML
    * Introduces FieldProviders which function similarly to ConfigurationProviders
    * Improves performance slightly by skipping two expensive rendering steps
    * Streamlined a classes and viewhelpers
    
    Also contained are a few additional ViewHelpers and some basic bugfixes.
    Apologies for the combined commit; after working on this for three months
    it was too complicated to split this into smaller pieces.
    
    Note: fixes #37190 but cannot guarantee other extensions will not
    re-specify tt_content.colPos as something other than signed smallint(6).
    
    Change-Id: Ic9812b2af83a6a142b48a886617c3458c45d4dad
    Fixes: #39269
    Fixes: #37190
    Fixes: #36907
    Fixes: #34543
    Fixes: #35530
    Fixes: #38647
    Fixes: #34717
    Fixes: #34926
    Fixes: #38434

commit 4dcb1dc52565aed8cbca816850400c548b0c7452
Author: Claus Due <*****@wildside.dk>
Date:   Mon Aug 5 04:15:40 2013 +0200

    [TASK] Simplify ViewHelper inheritance and base class placement

commit 75fcd37db43bef950b9378644d2b961635185c2a
Author: Thomas Allmer <*****@gmail.com>
Date:   Mon Nov 18 14:46:36 2013 +0100

    [TASK] Replace all calls to CMS functions with namespace equivalent
    
    A simple shell script was used for all the replacements
    https://gist.github.com/daKmoR/7490199

commit 5511d72d220d89627255e270d3ca178362f6c2b2
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Nov 24 19:31:01 2013 +0100

    [TASK] Switch to namespaces

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 8bf2b5beb89c7d72a41230f152d9a5a3d308ba84
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:11:00 2013 +0100

    [TASK] Happy new year!