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

Fixed Template Modifications system can't access style properties.

CyberAP

Well-known member
#3
I created an addon, created new style property group for it. Then I made a TM:

Template 'editor_contents.css'

Find:

Code:
}

body
{
Replace:

Code:
<xen:if is="@readactor_enabled">
<xen:include template="readactor_editor_contents.css" />
</xen:if>
}

body
{
@readactor_enabled and readactor_editor_contents.css are both part of the addon.

I get this error: Compiler error (may be from another template modification)
 

CyberAP

Well-known member
#4
I solved this by using extra template that contained my conditional. But I think we shouldn't be restricted only to templates.
 

Mike

XenForo developer
Staff member
#5
You don't. It's sort of just the opposite of the other bug report: right now, you can't use @property short cuts - you need to use the {xen:property} version.
 

Mike

XenForo developer
Staff member
#7
Yeah, @property is mostly just done to expose CSS inside the templates. If you look at what's in the database (or compare templates, for example), it's not actually there.
 

CyberAP

Well-known member
#9
Fixing shortcuts in TM caused their breakage in templates :LOL:
Just try to create a template that contains something like this:

Code:
<xen:if is="@customProp">
Hello world!
</xen:if>
That should throw an error. Using {xen:property} however works fine, but anyway it transforms to a shortcut after a template saving.

So this is not completely fixed. @Brogan if you could help me out a bit please move this thread again to Open Bugs.
 

Mike

XenForo developer
Staff member
#10
Wait, so what you're reporting has nothing to do with the template modifications system? It really should be reported separately then - if I'm understanding correctly, this can be reproduced in 1.1 as well.
 
A

account8226

Guest
#13
I'm still 99% sure what you're explaining happens in 1.1 as well, but it's fixed now - only known, valid properties will be translated to the @propertyName syntax.
Any ideas when you will release that fix ?