سؤال

I'm trying to display a value from a custom profile field if the field has a value.

Traditionally phpBB has the following inside viewtopic_body.html

<!-- BEGIN custom_fields -->
<dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
<!-- END custom_fields -->

My field identification name is myprojectsthread and has been added after the above code. I have placed a value into my own profile and used the following code to display the custom field

<!-- IF postrow.custom_fields.PROFILE_MYPROJECTTHREAD_NAME -->
<dd><a href="/board/viewtopic.php?{postrow.custom_fields.PROFILE_MYPROJECTTHREAD_NAME}">My Project Thread</a></dd>
<!-- ENDIF -->

Successfully the link shows but the value after viewtopic.php? doesn't show and the link is invalid.

Could someone please point me in the right direction as to how to fix this?

Thanks

هل كانت مفيدة؟

المحلول

<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "My Project Thread Name" -->
<dd><a href="/board/viewtopic.php?{postrow.custom_fields.PROFILE_FIELD_VALUE}">My Project Thread</a></dd>
<!-- ENDIF -->

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top