1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Getting Option Problem

Discussion in 'XenForo Development Discussions' started by Daniel 'RTRD', Aug 12, 2013.

  1. Daniel 'RTRD'

    Daniel 'RTRD' Well-Known Member

    Option:
    Code:
    <option option_id="RandomOption" edit_format="spinbox" data_type="integer" can_backup="1">
          <default_value>0</default_value>
          <edit_format_params>min=0</edit_format_params>
          <sub_options></sub_options>
          <relation group_id="RandomOption" display_order="20"/>
        </option>
    Dump:
    Code:
    {xen:helper dump, {$xenOptions.RandomOption}}
    Template:
    Code:
    <xen:if is="{$xenOptions.RandomOption} != '0'">
        Hello.
    </xen:if>
    The problem:
    When I dump the option I get "NULL". Why is that?
     
  2. MattW

    MattW Well-Known Member

    I've just tried it exactly as you are doing it, and I'm getting with 0

    Code:
    string(1) "0"
    and with 1

    Code:
    string(1) "1"
    Hello.
     
  3. Daniel 'RTRD'

    Daniel 'RTRD' Well-Known Member

    I have tried on two forum installations and I get the same. :/
     
  4. MattW

    MattW Well-Known Member

    Where are you rendering the template on the site?
     

Share This Page