jfh-skinning-profile-templates-faq [Jcink.com Wiki]

Custom Profile Templates FAQ

Custom profile templates allows you to modify the mini profile next to every post in-topic. If you haven't read the basic guide on profile templates, see here first: Custom Profile Templates

Below is a collection of frequently asked questions related to mini profile templates and customization.

How can I remove fields that are "N/A?"

By default, if a specified field or variable doesn't exist, it gets replaced with “N/A” or “Not Available.” If you don't want these fields to show up on the profile at all unless they are filled in, you can place the field in a span tag.

In this example, we have a profile field called “Special Ability.” We don't want this field to display unless it is filled out by either the user or an administrator. Wrap the field in a span and give it a class:

<span class='special-ability'>Special Ability: <!-- |field_#| --></span>

Now find the <% BOARD %> tag in Board Wrapper.

Add this code below it:

<script>$('.special-ability:contains("N/A")').remove();</script>

You can do this for each field that you don't wish to be displayed unless it is filled out.

 
jfh-skinning-profile-templates-faq.txt · Last modified: 2013/08/25 23:57 by jcink