Topic: hide main navigation?
Hello
is it possible to hide the main navigation and keep the list of categories on the right side only?
Thanks :-)
Welcome to jobberBase Developer Community!
You are not logged in. Please login or register.
We've just added a new category for forums dedicated to local communities.
If you're interested in starting a community in your country or even city, please write us at hello@jobberbase.com and we'll make it happen.
We're also looking for moderators on each local community -- so email us :).
Pages: 1
Hello
is it possible to hide the main navigation and keep the list of categories on the right side only?
Thanks :-)
Try this:
In _templates/default/header.tpl remove:
<div id="categs-nav">
<ul>
{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].var_name}"><span>{$categories[tmp].name}</span><span class="cnr"> </span></a></li>
{/section}
</ul>
</div><!-- #categs-nav -->
Then you have to change the sidebar code to show the categories on each page:
In _templates/default/sidebar.tpl
Find:
{if $CURRENT_PAGE == ''}
<br />
<div id="stats">
<strong>{$jobs_count_all} {$translations.homepage.sidebar_totaljobs}</strong>
<br />
{if $smarty.const.SIDEBAR_SHOW_WHAT == 'categories'}
{foreach item=job from=$jobs_count_all_categs}
<strong>{$job.categ_count}</strong> {$translations.homepage.sidebar_for} <a href="{$BASE_URL}{$URL_JOBS}/{$job.categ_varname}/">{$job.categ_name}</a><br />
{/foreach}
{else}
{foreach item=job from=$jobs_count_per_city}
<strong>{$job.jobs_in_city}</strong> {$translations.jobscity.sidebar_jobs_in} <a href="{$BASE_URL}{$URL_JOBS_IN_CITY}/{$job.city_ascii_name}/">{$job.city_name}</a><br />
{/foreach}
{if !$hide_other_cities_in_sidebar}
<strong>{$jobs_count_in_other_cities}</strong> {$translations.jobscity.sidebar_jobs_in} <a href="{$BASE_URL}jobs-in-other-cities/">{$translations.sidebar.other_cities}</a>
{/if}
{/if}
</div><!-- #stats -->
{/if}
And replace it with:
<br />
<div id="stats">
<strong>{$jobs_count_all} {$translations.homepage.sidebar_totaljobs}</strong>
<br />
{if $smarty.const.SIDEBAR_SHOW_WHAT == 'categories'}
{foreach item=job from=$jobs_count_all_categs}
<strong>{$job.categ_count}</strong> {$translations.homepage.sidebar_for} <a href="{$BASE_URL}{$URL_JOBS}/{$job.categ_varname}/">{$job.categ_name}</a><br />
{/foreach}
{else}
{foreach item=job from=$jobs_count_per_city}
<strong>{$job.jobs_in_city}</strong> {$translations.jobscity.sidebar_jobs_in} <a href="{$BASE_URL}{$URL_JOBS_IN_CITY}/{$job.city_ascii_name}/">{$job.city_name}</a><br />
{/foreach}
{if !$hide_other_cities_in_sidebar}
<strong>{$jobs_count_in_other_cities}</strong> {$translations.jobscity.sidebar_jobs_in} <a href="{$BASE_URL}jobs-in-other-cities/">{$translations.sidebar.other_cities}</a>
{/if}
{/if}
</div><!-- #stats -->
This should show the categories sidebar on each page. You need to select the option to show categories in sidebar in admin settings.
thanks for your reply :-)
just tried your code changes in sidebar but it shows only on main page and not in all pages
thanks for your help though :-)
Hi!
In addition to what hobo told you, also do the following:
Move this code from page_home.php (ie: cut it)
// 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', SIDEBAR_ONLY_CITIES_WITH_JOBS && $numberOfJobsInOtherCities == 0);
$smarty->assign('jobs_count_per_city', $job->GetJobsCountPerCity(SIDEBAR_ONLY_CITIES_WITH_JOBS));
}
into index.php, right before switch($page)
It should work nicely ![]()
Posts [ 4 ]
Pages: 1
Powered by FluxBB
[ Generated in 0.043 seconds, 7 queries executed ]