MyBB Community Forums

Full Version: I need to create a variable link in the post bit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to create a link in the post bit classic that will only display if the user has information to link to.

Example:  I have a member garage set up (xthread enhanced forum) so the link I need should show in the post bit but only if the members have created a garage for themselves.  Right now I am using this to display a link to visit the member's garage but it show no matter if he has or doesn't have a garage set up. 


<a href="forumdisplay.php?fid=41&amp;filterxt_uid={$post['uid']}" title="Visit My Garage" class="bradius"><span><i class="fa fa-car"></i>&nbsp; Visit My Garage</span></a>


How can I adjust this line to be a variable or 'if' command instead?

Any help greatly appreciated!
You will need to install the template conditionals plugin and then navigate to the postbit template.

From there, you will need the following:
<if $post['fid##'] then>formatting here
<else>
formatting here if that userfield is empty
</if>