Page 1 of 1
Calguys User Directory, printing FEU property values
Posted: Mon Aug 11, 2014 6:09 pm
by urheat
In Frontend User I have “pizza” property with a dropdown list like this:
Code: Select all
Pan Pizza=Pizza1
Classic Pizza=Pizza2
When I print values to website using Calguys User Directory with this code:
I get “pizza1, pizza2”.
Is there a way to print to web page “Pan Pizza, classic pizza”?
Re: Calguys User Directory, printing FEU property values
Posted: Mon Aug 11, 2014 6:45 pm
by chandra
The format of your dropdown list is wrong. Change key and value.
Means
Pizza1=Pan Pizza
...
Re: Calguys User Directory, printing FEU property values
Posted: Mon Aug 11, 2014 7:15 pm
by urheat
chandra wrote:The format of your dropdown list is wrong. Change key and value.
Means
Pizza1=Pan Pizza
...
I can't anymore. Simply but: We have about 200 users and we have to change some of the dropdown values (multilingual).
Re: Calguys User Directory, printing FEU property values
Posted: Mon Aug 11, 2014 7:44 pm
by chandra
Wrong input, wrong result - okay, night is long think you will know what you have to do

.
Joking aside - make a look to the related template and compare it with pure html output (sources). Maybe it's possible to change the related vars for key and value.
Re: Calguys User Directory, printing FEU property values
Posted: Wed Aug 13, 2014 6:23 am
by urheat
chandra wrote:Wrong input, wrong result - okay, night is long think you will know what you have to do

.
Joking aside - make a look to the related template and compare it with pure html output (sources). Maybe it's possible to change the related vars for key and value.
If I'm correct the system stores the value to database, not the key. For example, if I have:
Pizza1=Pan Pizza
In database there is "Pan Pizza".
Another - at least for me - weird thing is that when Frontend user edits it's attributes, there is Pizza 1 - not Pan Pizza. And in User Directory it shows Pan Pizza. So the keys and values are reversed in FEU and User Directory. Or I'm just totally confused
I can solve this with monsterous if sentences, but...
Re: Calguys User Directory, printing FEU property values
Posted: Wed Aug 13, 2014 9:50 am
by chandra
Bug report?
Re: Calguys User Directory, printing FEU property values
Posted: Wed Aug 13, 2014 9:55 am
by urheat
chandra wrote:Bug report?
Well I've been twistings these around so heavily, that this could easily be my mistake also

That's why I don't call this a bug. Maybe someone could confirm this?
Re: Calguys User Directory, printing FEU property values
Posted: Tue Sep 02, 2014 9:00 pm
by 10010110
I have a country multiselect list with the property/value pairs like this:
Code: Select all
Andorra=ad
United Arab Emirates=ae
…
The output in the signup form is
Code: Select all
<option value="ad">Andorra</option>
<option value="ae">United Arab Emirates</option>
…
The default CGUserDirectory summary template should have this for regular dropdowns:
Code: Select all
{if $properties.$propname.type == 4}
{$feu_smarty->get_dropdown_text($propname,$onepropvalue)}
{* dropdown *}
However, if I remember correctly, multi-select values came as plain string of the keys so one has to get creative to get the right output; this is the part of my template for my multi-select value list:
Code: Select all
…
{elseif $properties.$propname.type == 5}
{* multiselect *}
{assign var='tmp' value=','|explode:$onepropvalue}
{$feu_smarty->get_multiselect_text($propname,$onepropvalue,'values')}
{cgud_getpropertysummary_url prop="$propname" propval="$onepropvalue" assign='urls'}
<ul>
{foreach from=$values name='multi' item='one'}
<li>{$one}</li>
{/foreach}
</ul>
{else}
…
Perhaps that helps a little?