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

Lack of Interest [Suggestion] ability to parse conditional in custom scalar style properties

Discussion in 'Closed Suggestions' started by Miko, Oct 18, 2010.

  1. Miko

    Miko Well-Known Member

    The current style properties are fantastic and give us more control than any other forum software on the market.

    They are almost perfect but with a small flaw: you cannot use them to parse conditional entered in scalar style properties.

    Wouldn't be great if we could just create a custom scalar style properties and use it to enter custom conditional

    Like for example <xen:if is="conditional here">

    And have a second scalar with the closing if </xen:if>

    Then i could enter in a template. @myfirstscalar. Some code in here @myclosingscalar

    Unfortunately right now the template will not parse the conditional and render it as plain text :(

    I also would like to see extra style properties: Text area, select menus, multiple tick boxes...

    Thank you :)

  2. Mike

    Mike XenForo Developer Staff Member

    I didn't really follow what you want. Can you show me a bit of hypothetical template code?
  3. Enigma

    Enigma Well-Known Member

    Why wouldn't you put the conditional directly in the template?
  4. Miko

    Miko Well-Known Member

    Hi Mike,

    I created 2 scalar style properties

    First one named, xen_test_start and the second xen_test_end

    In the first one in the string field I enter any type of template conditional for example

    <xen:if is="{$forum.node_id} == 1">
    In the second scalar property under sting I enter

    Now in a template were the above conditional should normally work i should be able to simply enter

    @xen_test_start  my HTML here @xen_test_end
    And that should be identical as entering this directly in the template

    <xen:if is="{$forum.node_id} == 1"> my HTML here </xen:if>
    problem is that when the template is rendered the conditional is actually showing as plain text in the front end.

    Doest it make sense ? Posting from an iPad and can't attach a screenshot.

    If it's still not clear I will post you one later today :)
  5. Mike

    Mike XenForo Developer Staff Member

    It makes sense now, but it's a fundamental change to the compilation process. I can't see it being feasible.
  6. Miko

    Miko Well-Known Member

    Feeling sad about it.... had so many good use for it :(

    Thanks anyway Mike, appreciate the time you took for looking into it.

Share This Page