Style custom user field on messageinfo - Xenforo


Feb 4, 2007
Hi everyone,
I currently have the custom user fields in an expandable box along with medals to keep things looking tidy. This is how it looks:


Because when expanded it looks like this!


Now what I would really like to do, is to have the 'Alliance - My Alliance' show underneath the last banner, so it's visible when closed and expanded.
Is it possible to do this? Is it also possible to style that custom userfield so it has the same style as a banner?

I've played around in the messagemacros and found the right location.

Presuming no if command is needed? If someone hasn't filled out the custom field then it won't display?
Last piece of the puzzle is the styling. Any help to make this look like a banner below would be greatly appreciated.


Ponders things of unknowable validity
Mar 24, 2011
Not sure specifically how this software arranges the template parts, however this can be done by moving the HTML for the "Alliance" outside of it's containing element, and above the .collapseTrigger element. There's a series of dl elements that correspond to those labels and values.

Does that part of the template iterate over an associative array or other data structure that contains the labels and their corresponding values?

It would be helpful if you copied and pasted the contents of the corresponding template part, so we can see what we're dealing with. Then I can suggest changes to make, knowing how the HTML is being generated.

Also, look for the template part that contains the element with the class collapseTrigger – that's the button that triggers the expansion/contraction of that area. If it's in the same template part, great. If not, then the corresponding data for the 'Alliance' may not be available inside that template part. This depends on how this software provides data to the template parts, or if the template parts themselves call functions to obtain this data.