phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

Display custom field doesn' t work

All style (template, theme and imageset) related questions for the new release; advice, feedback here please.

Display custom field doesn' t work

Postby nemoprincess » Sun Nov 01, 2009 11:42 pm

Hello,
I have three custom field: nome, cognome, regione.

I want display only nome in viewtopic_body.html so I

<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "nome" -->
<b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}<br />
<!-- ENDIF -->

and this

<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Nome" -->
<b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}<br />
<!-- ENDIF -->

but it doesn' t work. How can I try? How can I solve? Thank you.
nemoprincess
Registered User
 
Posts: 1
Joined: Sun Nov 01, 2009 11:32 pm

Re: Display custom field doesn' t work

Postby Sniper_E » Sun Feb 28, 2010 7:04 am

In these lines of your viewtopic_body.html template,
Code: Select all
      <!-- BEGIN custom_fields -->
         <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
      <!-- END custom_fields -->

Try adding your IF statement like this,
Code: Select all
      <!-- BEGIN custom_fields -->
         <!-- IF not postrow.S_PROFILE_COGNOME or not postrow.S_PROFILE_REGION -->
         <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
         <!-- ENDIF -->
      <!-- END custom_fields -->
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E
Registered User
 
Posts: 6
Joined: Sat Sep 29, 2007 4:57 pm


Return to [3.0/Olympus] Styling

Who is online

Users browsing this forum: No registered users and 1 guest