Calguys User Directory, printing FEU property values

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Calguys User Directory, printing FEU property values

Post 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:

Code: Select all

{$oneuser.properties.pizza}
I get “pizza1, pizza2”.

Is there a way to print to web page “Pan Pizza, classic pizza”?
chandra

Re: Calguys User Directory, printing FEU property values

Post by chandra »

The format of your dropdown list is wrong. Change key and value.

Means

Pizza1=Pan Pizza
...
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: Calguys User Directory, printing FEU property values

Post 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).
chandra

Re: Calguys User Directory, printing FEU property values

Post by chandra »

Wrong input, wrong result - okay, night is long think you will know what you have to do O0.

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.
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: Calguys User Directory, printing FEU property values

Post by urheat »

chandra wrote:Wrong input, wrong result - okay, night is long think you will know what you have to do O0.

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 :D

I can solve this with monsterous if sentences, but...
chandra

Re: Calguys User Directory, printing FEU property values

Post by chandra »

Bug report?
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: Calguys User Directory, printing FEU property values

Post 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?
10010110
Translator
Translator
Posts: 224
Joined: Tue Jan 22, 2008 9:57 am

Re: Calguys User Directory, printing FEU property values

Post 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?
Post Reply

Return to “Modules/Add-Ons”