Template Syntax Inconsistency

James

Well-known member
I didn't report this as a bug as it doesn't seem to be one.

In the account_avatar_overlay template, the avatar code is:
Code:
<img src="{xen:helper avatar, $visitor, l}" alt="{xen:phrase current_avatar}" />

In the member_card template, the avatar code is:
Code:
<img src="{xen:helper avatar, {$user}, l}" alt="" style="{xen:helper avatarCropCss, $user}" />

In the member_card template, curly brackets are used around the user variable, but they're not used around the visitor variable. Does this mean that the curly brackets aren't needed?
 
Curlies are not always required when dealing with a strict variable reference, unless its construction is complex.

Yeah, it's complicated.
So in the above case, was its construction considered complex (the member_card template) or was it just how one of you guys were feeling at the time and decided to throw curlies in? ;)
 
Top Bottom