Log in

View Full Version : please help with if condition


Hex_legend
05-07-2010, 11:03 AM
This is to go in postbit_legacy

I am looking for the code so that if they say yes, it will display an image, but the next field would be if they want the preset image or a custom one, where they will enter the URL.

So:

Do you want a banner? Yes / No
Would you like it to be preset / custom? Preset / Custom
If Custom, Enter URL here - URL

How would I do this with an IF condition? Note that the image will be surrounded by <a href=""> to link to another site.

Currently I am using:

<if condition="$post['field8']==Yes"><a target="_blank" href="http://www.xxxx/$post[field7]"><img src="http://xxxxxx/forum/foundat.png" border="0"></a></if>

However this is just to show the default image if they want a banner shown

vbenhancer
05-07-2010, 12:35 PM
you know, if can contain another if...

Hex_legend
05-07-2010, 01:16 PM
Well for some reason, it doesn't seem to work if I have:
What type of banner? Default / Custom / None

Can you please put some sample code up that should work?

It would need to allow them to put a URL to their banner in place