I know that the character sheet allows them to appear in the post rail but can we call on specific fields in the HTML/CSS?
Is it possible to use custom profile fields in custom post rail?
Howdy!
Yes, you can. @prophet is right that {{#each user.custom_fields}} prints every field. You don't have to use the loop, though. You can pick a single field by its number:
{{#if user.custom_fields.0}}
<div class="rail-race">{{ user.custom_fields.0.label }}: {{ user.custom_fields.0.value }}</div>
{{/if}}
{{#if user.custom_fields.2}}
<div class="rail-class">{{ user.custom_fields.2.value }}</div>
{{/if}}Only fields with "Show in mini profile" turned on are included. They're numbered from 0 in the order they appear in ACP > Custom profile fields.
If a member leaves a field blank, it's skipped and the other numbers stay the same. The {{#if}} stops an empty line from showing for that member.
If you reorder your fields or turn "Show in mini profile" on or off for one, the numbers change. Make sure you check your template after you do either.
You can't pick a field by its name or handle yet. Fields are only available by number.
Because you write the HTML yourself, you can give each field its own class (like rail-race above) and style it in your CSS.
