I have this core profile field in Drupal7:
I want it to be shown in the user´s profile only if the field has information in it (it´s a deprecated field, but some old users have data in it, and migrate modules didn´t import it properly, because it´s a hardcoded list).
I´m using panels, token and Display Suite modules. At the profile page, I have this panel with a special coded DS field, that has dinamic information using tokens.
If I just paste:
Mi Curso: %user:profile-curso-basico I get the field information properly, but I want to show it only if profile-curso-basico field isn´t empty.
So I thought of this (the input type is PHP, so I can paste some php code):
<?php if (!empty(%user:profile-curso-basico)): ?> %user:profile-curso-basico <?php endif; ?>
And I´ve got this error:
Parse error: syntax error, unexpected T_LNUMBER, expecting T_PAAMAYIM_NEKUDOTAYIM in /home/liga/public_html/modules/php/php.module(80) : eval()'d code on line 9
What´s wrong with that snippet? Maybe I shouldn´t add tokens into (!empty( )) ? How may I change that in order to work? Thanks!!