incoe

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 :-)

http://www.TheHostHome.com | over 22 million domains are registered with us

hobo

Re: hide main navigation?

Try this:
In _templates/default/header.tpl remove:

Code:

<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">&nbsp;</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:

Code:

{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:

Code:

                <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.

incoe

Re: hide main navigation?

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 :-)

http://www.TheHostHome.com | over 22 million domains are registered with us

putypuruty

Re: hide main navigation?

Hi!

In addition to what hobo told you, also do the following:

Move this code from page_home.php (ie: cut it)

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', 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 smile