Page 1 of 1

Is this possible

Posted: Tue Apr 15, 2008 2:37 pm
by relic
Hi.

I am wanting to know if this is possible with the company directory module, you will see by the code what i am trying to achieve, but i want the payment accepted fields to display images instead of text. Field types are set to "textbox" but nothing seems to display on output.

Heres the code:

Code: Select all

{if $entry->eftpos ne ''} <img src="/global/cards-eftpos.gif" width="29" height="19" />{/if}{if 
          $entry->mastercard ne ''} <img src="/global/cards-mastercard.gif" width="29" height="19" />{/if}{if 
          $entry->visa ne ''} <img src="/global/cards-visa.gif" width="29" height="19" />{/if}
Also reason for selecting field type as "textbox" is so i can just enter "yes" in the text box if that payment method is accepted by any one company.

Any ideas?

Cheers
David

Re: Is this possible

Posted: Wed Apr 16, 2008 5:57 am
by cubix
firstly is this the detailed template or a summary template

in a detailed template, i dont believe customfields are passed in the $entry variable.

and in the summary, they maybe passed as $entry->customfields[0]->value

cant quite remember.

anyway, if the textbox is empty then ne '' will be fine.