- Title: New member
- Status: Offline
- Registered: 2011-10-11
- Posts: 3
Topic: List the cities in a drop down menu
Hello,
I have created a drop down to list my categories on all the pages:
<a href="#">Categories</a>
<ul class="noJS">
{section name=tmp loop=$categories}
<li id="{$categories[tmp].var_name}" {if $current_category == $categories[tmp].var_name}class="selected"{/if}>
<a href="{$BASE_URL}{$URL_JOBS}/{$categories[tmp].var_name}/" title="{$categories[tmp].name}">{$categories[tmp].name}</a>
</li>
{/section}
</ul>
I would like to do the same for the cities. I've tried a few things like:
<a href="#">Cities</a>
<ul class="noJS">
{foreach item=job from=$jobs_count_per_city}
<li id="{$cities_overview[tmp].var_name}" {if $current_category == $cities_overview[tmp].var_name}class="selected"{/if}>
<a href="{$BASE_URL}{$URL_JOBS_IN_CITY}/{$job.city_ascii_name}/">{$job.city_name}</a>
</li>
{/foreach}
</ul>
The only problem is when I am in a category, I don't see the list of the cities anymore.
Can anyone help me please?
- Title: Moderator
- Status: Offline
- From: Bangalore, India
- Registered: 2011-09-01
- Posts: 101
Re: List the cities in a drop down menu
could you please print this array $cities_overview and check it what values you are getting to tpl file from the main php file.
Thanks &Regards
DV Tech Services Pvt Ltd
Email: venkat@dvtservices.com;
www.dvtservices.com Bangalore. India
We are Ready to Resolve your problems ..... And Ready to work for you
- Title: New member
- Status: Offline
- Registered: 2011-10-11
- Posts: 3
Re: List the cities in a drop down menu
This is a weird behavior. I only want to show a list of the cities...
If I put my code there, on the home page I have the list of the city that have a job and the nuber of job there is. If I select a city everything is blank.
Isn't there a way to have a list with the cities that have jobs and on all pages?
What am I missing?
Thanks for your help
- Title: New member
- Status: Offline
- Registered: 2011-10-11
- Posts: 3
Re: List the cities in a drop down menu
Ah FYI I am not talking about the admin section...
- Title: Moderator
- Status: Offline
- From: Bangalore, India
- Registered: 2011-09-01
- Posts: 101
Re: List the cities in a drop down menu
for the cities you need to use asci name. please change the var name to asci name your problem will solve
Thanks &Regards
DV Tech Services Pvt Ltd
Email: venkat@dvtservices.com;
www.dvtservices.com Bangalore. India
We are Ready to Resolve your problems ..... And Ready to work for you
Posts [ 5 ]
Guest posting is disabled. You must login or register to post a reply.