To achieve what you want, you have to do the following:
- move the following code from page_home.php (by move I mean Cut but I guess that you get the point)
Code:
// get jobs
$smarty->assign('jobs_count_all', $job->CountJobs());
if (SIDEBAR_SHOW_WHAT == 'categories')
{
$smarty->assign('jobs_count_all_categs', $job->GetJobsCountForAllCategs());
}
else
{
$numberOfJobsInOtherCities = $job->GetNumberOfJobsInOtherCities();
$smarty->assign('jobs_count_in_other_cities', $numberOfJobsInOtherCities);
$smarty->assign('hide_other_cities_in_sidebar', $numberOfJobsInOtherCities < SIDEBAR_ONLY_CITIES_WITH_AT_LEAST_NUMBER_OF_JOBS);
$jobsCountPerCity = $job->GetJobsCountPerCity();
// exclude the cities that don't have at least the specified number of jobs
foreach ($jobsCountPerCity as $index => $jobsPerCity)
{
if ($jobsPerCity['jobs_in_city'] < SIDEBAR_ONLY_CITIES_WITH_AT_LEAST_NUMBER_OF_JOBS)
unset($jobsCountPerCity[$index]);
}
$smarty->assign('jobs_count_per_city', $jobsCountPerCity);
}
into the root index.php, before the line
- in _templates/default/sidebar.tpl, remove the {if $CURRENT_PAGE == ''} line and the {/if} on the last line
This should do it.
Please let us know if it works.