PDA

View Full Version : Customize GreenLeaves with radio buttons


globalone
11-22-2006, 03:08 PM
Hi,

I am customizing view-link.tpl and I cannot arrive to show up the result of radio button or checkbox. Actually I am using the tag {$link.difficulte} which worked perfectly with 1.2 version, but now with 2.0 the only result I get is 0,1,2,3 instead of the content of the field.

I ve tried several combinations, but it does not work :wallbash:
See here my test page under Difficulté or Infos nutrition next to the images
http://www.fr-cuisine.com/biscuits-p-tisserie-boulangerie/cakes/cake-aux-carrottes-glac-l11.html

This is not included in {foreach}, this is individual code in between div

Does someone can help me :) please?

Thanks and kind regards.
Nathalie

globalone
11-23-2006, 09:38 AM
Any ideas ?

Thanks
Nathalie

globalone
11-24-2006, 01:12 PM
PLeae can someone help me with that one??

I ve tried that, but still showing 0 or 1 or 2 instead of the result of my radio button choice (Facile or Moyen or Difficile)


{if $field.type eq 'radio'}
{assign var="field_radio" value="field_"|cat:$field.name|cat:'_'|cat:$link.$key}
{$lang.$field_radio}
{else}
{$link.difficulte}
{/if}
What should I change exactly ?? :sos:

See here my test page under Difficulté or Infos nutrition next to the images http://www.fr-cuisine.com/biscuits-p...-glac-l11.html (http://www.fr-cuisine.com/biscuits-p-tisserie-boulangerie/cakes/cake-aux-carrottes-glac-l11.html)

Thanks a lot :air-kiss:

Nathalie

globalone
11-27-2006, 08:52 AM
Hi

Is it possible to get at least an answer on that one????

Thanks

Nathalie

Cris Santos
12-03-2006, 10:35 PM
Oh dear - you're still waiting?
I'm needing to know this too...
can someone, anyone???

Dave Baker
12-04-2006, 12:03 AM
***Please try the following :***

{if $field.type eq 'radio'}
{assign var="field_radio" value="field_"|cat:$field.name|cat:'_'|cat:$link.$key}
{$lang.$field_radio}
{else}
{assign var="field_radio" value="field_"|cat:$field.name|cat:'_'|cat:$link.$key}
{$lang.$field_radio}
{/if}

WTM
12-04-2006, 12:16 AM
Dave,

May I ask what is the difference between these two conditions? Looks like you have exactly the same code for both cases.

Do you have to use "if" condition or can you just replace all this with simple code like this: {assign var="field_radio" value="field_"|cat:$field.name|cat:'_'|cat:$link.$key}
{$lang.$field_radio}

Just curious...

globalone
12-04-2006, 08:40 AM
Sorry I had the answer via the support from Simon but I forgot to post the solution :sleeping:


Hi Nathalie,

Please try to use the following

{assign var="field_radio" value="field_"|cat:"difficulte_"|cat:$link.difficulte}
{$lang.$field_radio}

instead of

{$link.difficulte}


I think this modification might be helpful.





It is working perfectly for me see it here
http://www.fr-cuisine.com/new-links.html
http://www.fr-cuisine.com/biscuits-p-tisserie-boulangerie/cakes/cake-aux-carrottes-glac-l11.html

Does someone can provide me the same but for CHECKBOX instead of radio buttons ? :kiss:

Thanks a lot for your support.
Nathalie

globalone
12-06-2006, 10:50 AM
Any idea on that one??

Does someone can provide me the same but for CHECKBOX instead of radio buttons ? :kiss:

Thanks a lot for your support.
Nathalie

Vasily B.
12-18-2006, 01:03 PM
Hi Nathalie,

If you have a checkbox field with the following name you should try to use this text:


{array_to_lang values=$link.TEST_NAME name=TEST_NAME}

Where TEST_NAME is the name of your checkbox field.

globalone
12-19-2006, 09:25 AM
Thanks a lot Simon :yahoo:

I ll try it asap.

Kind regards.
Nathalie

Vasily B.
12-20-2006, 09:59 AM
You are welcome, please let me know the results, Nathalie