PDA

View Full Version : Postbit Legacy Link Question


Thamelas
09-26-2008, 05:30 AM
I have a field where a user can put in a guild name. We'll call that "Field 8". I also have a field where the user can put in a guild website. We'll call that "Field 14".

I have the code set up to make the guild name a link in the postbit.

Here is the problem: Right now its making a broken link on their guild name if they didnt put in a URL. How can I make it not a link (jsut plain text) if the user does not put in a website address in field 14?

Here is the code I have:
<div><if condition="$post['field8']">
Guild: <a href="$post[field14]" target="_blank">$post[field8]</a></div>
</if>

Lynne
09-26-2008, 03:46 PM
How about:

<div><if condition="$post['field8']">
Guild: <if condition="$post['field14']"><a href="$post[field14]" target="_blank">$post[field8]</a><else />$post[field8]</if></div>
</if>

Thamelas
09-26-2008, 05:16 PM
Works perfectly! Thanks!