• 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

Miko

Well-known member
#1
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 :)

Miko
 

Miko

Well-known member
#4
I didn't really follow what you want. Can you show me a bit of hypothetical template code?
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

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

Code:
</xen:if>
Now in a template were the above conditional should normally work i should be able to simply enter

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

Code:
<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 :)
 

Mike

XenForo developer
Staff member
#5
It makes sense now, but it's a fundamental change to the compilation process. I can't see it being feasible.
 

Miko

Well-known member
#6
Feeling sad about it.... had so many good use for it :(

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