Style custom user field on messageinfo - Xenforo

DaveL

Habitué
Joined
Feb 4, 2007
Messages
1,480
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:

a2.png


Because when expanded it looks like this!


a3.png


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.

a4.png
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.
 

echo_off

Ponders things of unknowable validity
Joined
Mar 24, 2011
Messages
1,296
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.
 
Top