Display custom field doesn' t work

All style (template, theme and imageset) related questions for the new release; advice, feedback here please.
Post Reply
nemoprincess
Registered User
Posts: 1
Joined: Sun Nov 01, 2009 11:32 pm

Display custom field doesn' t work

Post by nemoprincess »

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.

User avatar
Sniper_E
Registered User
Posts: 6
Joined: Sat Sep 29, 2007 4:57 pm

Re: Display custom field doesn' t work

Post by Sniper_E »

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!

Post Reply