XF 2.2 Grabbing the user banner title and using it as a tooltip on the banner.

Russ

Well-known member
I'm trying to figure out how to grab the user banner text and place it in a tooltip. It sounds strange, but we're not displaying the user banner text by default so we want to use a tooltip.

Code:
<xf:userbanners user="$user" tag="div" class="message-userBanner" data-xf-init="tooltip" title="User banner text here" itemprop="jobTitle" />

The above code works fine with the tooltip. But I'm trying to place the text of the banner there replacing "User banner text here". I've tried {{ dump($user) }} to find any exposed values but I'm not seeing anything.
 

Russ

Well-known member
message_macros

I worded it weird. I need the text from the user banner.
Like yours, "Staff member" would display in the tooltip.
 

Brogan

XenForo moderator
Staff member
I haven't checked but I don't think you're going to be able to do that because multiple banners can be displayed and the stacking and display styling priority options determine which one(s).

The xfuserbanner tag has backend php code work that out to display them.
 
Top