Page 1 of 1
question about smarty tags
Posted: Fri Oct 26, 2007 4:32 am
by cubix
Im trying to use the simple google map module with the cataloger module.
the variables i need to use are $street and $city
Code: Select all
{SimpleGoogleMap map='mymap' addr='Musee du Louvre, Paris'}
id assume it would work something like this...
Code: Select all
{SimpleGoogleMap map='mymap' addr=$street, $city}
any suggestions?
Re: question about smarty tags
Posted: Fri Oct 26, 2007 7:04 am
by cyberman
Use {get_template_vars} to see which Smarty variables are available.
Re: question about smarty tags
Posted: Fri Oct 26, 2007 8:51 am
by cubix
{$street} and {$city} are fields ive created for the cataloger.
the problem i have is how to put both tags inside another smarty tag without throwing errors.
Code: Select all
{SimpleGoogleMap map='mymap' addr=$street}
works fine
but i need to add the street, then the city for it to show the correct location.
Re: question about smarty tags
Posted: Fri Oct 26, 2007 10:06 am
by cyberman
Looks like addr is not ready to handle more than one parameter.
Have you tried to merge $street and $city?
Re: question about smarty tags
Posted: Fri Oct 26, 2007 11:37 am
by alby
cubix wrote:
{$street} and {$city} are fields ive created for the cataloger.
the problem i have is how to put both tags inside another smarty tag without throwing errors.
Code: Select all
{SimpleGoogleMap map='mymap' addr=$street}
works fine
but i need to add the street, then the city for it to show the correct location.
Try with:
Code: Select all
{SimpleGoogleMap map="mymap" addr="$street, $city"}
Alby
[solved] Re: question about smarty tags
Posted: Fri Oct 26, 2007 11:48 am
by cubix
thanks alby, thought it would be simple, i guess its late here.
cyberman, managed to get it going with something like this. but works just as well albys way.
Code: Select all
{assign var="map" value=$street,$city}