CGGoogleMaps + CGUserDirectory = displaying all my FEU

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
square
Forum Members
Forum Members
Posts: 51
Joined: Fri Jan 15, 2010 5:02 pm

CGGoogleMaps + CGUserDirectory = displaying all my FEU

Post by square »

Hi all,

I'm working at this : I'd like to display all my FEU on a Google Map. This isn't really hard and this is the snippet I use :

Code: Select all

{foreach from=$users item='oneuser'}
{foreach from=$oneuser.properties item='onepropvalue' key='propname'}
    {if $properties.$propname.name == "adresse"}
       {cggm_add_dynpoint map='2' address="$onepropvalue" name="$oneuser.username"}
    {/if}
   {/foreach}
{/foreach}
{CGGoogleMaps map="2"}
My problem is that I want to display in the baloon some properties of my FEU, like their adress, or their profil or something else.

I've got 2 properties :
- profile
- adress : this one's already used to geolocate the user's on the map

This is what I tried to display my FEU's balloon with properties :

Code: Select all

{foreach from=$users item='oneuser'}
  {foreach from=$oneuser.properties item='onepropvalue' key='propname'}
   
    {assign var='profile' value=$profile}

    {if $properties.$propname.name == "adress"}
    {assign var='UserName' value=$oneuser.username}
              
      {capture assign='description'}
      <h3>{$UserName}</h3>
      {$profile}
      {/capture}
    {cggm_add_dynpoint map='2' address="$onepropvalue" name="$UserName" description="$description"}
   {/if}
   {/foreach}
{/foreach}

{CGGoogleMaps map="2"}
This snippet don't display my properties. I know it's not really clean code (that's where I need help :P )

Any idea how can I display my properties ?

Any help welcome :)
Post Reply

Return to “Modules/Add-Ons”