evertsemeijn

Topic: Breadcrumbs?

I was wondering if there is anyone who is using breadcrumbs (like "home > jobs > job title") on his jobberbase. Was thinking about better navigation and I think this is also a basic how-to-make0-your-website-better-function.

Would you please let me know how you did that (or someone who wants to figure it out)?

Member of Jobberbase Development Team - Templates/Usability :: Looking for installation and/or custom design? :: Beautiful Wordpress themes

evertsemeijn

Re: Breadcrumbs?

Oke, no reply so far so i started some dirty coding myself. Until now I have

Code:
<div id="breadcrumb">
        <!--HOME-->
        {if $CURRENT_PAGE == ''}
            Home
        {/if}
        <!--CATEGORIE-->
        {if $CURRENT_PAGE != '' && $CURRENT_PAGE == 'jobs'}
            <a href="{$BASE_URL}">Home</a> > {$current_category}
        {/if}
        <!--JOBS-->
        {if $CURRENT_PAGE != '' && $CURRENT_PAGE != 'jobs' && $CURRENT_PAGE == 'job'}
            <a href="{$BASE_URL}">Home</a> > <a href="{$BASE_URL}jobs/{$current_category}">{$current_category}</a> > {$job.title} ({$job.company} in {$job.location})
        {/if}
        <!--WERKZOEKENDEN-->
        {if $CURRENT_PAGE != '' && $CURRENT_PAGE == 'employee'}
            <a href="{$BASE_URL}">Home</a> > Employee
        {/if}
        <!--WERKGEVERS-->
        {if $CURRENT_PAGE != '' && $CURRENT_PAGE == 'employer'}
            <a href="{$BASE_URL}">Home</a> > Employer
        {/if}
        <!--CONTACT-->
        {if $CURRENT_PAGE != '' && $CURRENT_PAGE == 'contact'}
            <a href="{$BASE_URL}">Home</a> > Contact
        {/if}
        <!--WIDGET-->
        {if $CURRENT_PAGE != '' && $CURRENT_PAGE == 'widget'}
            <a href="{$BASE_URL}">Home</a> > <a href="{$BASE_URL}employer/">Employer</a> > Widget
        {/if}
          <!--POST-->
          {if $CURRENT_PAGE != '' && $CURRENT_PAGE == 'post'}
              <a href="{$BASE_URL}">Home</a> > <a href="{$BASE_URL}employer/">Employer</a> > <a href="{$BASE_URL}post/">Post a job</a> > Write
          {/if}
          <!--VERIFY-->
          {if $CURRENT_PAGE != '' && $CURRENT_PAGE == 'verify'}
              <a href="{$BASE_URL}">Home</a> > <a href="{$BASE_URL}employer/">Employer</a> > <a href="{$BASE_URL}post/">Post a job</a> > Verify
          {/if}
          <!--CONFIRM-->
          {if $CURRENT_PAGE != '' && $CURRENT_PAGE == 'confirm'}
              <a href="{$BASE_URL}">Home</a> > <a href="{$BASE_URL}employer/">Werkgevers</a> > <a href="{$BASE_URL}post/">Post a job</a> > Confirm
          {/if}
        <!--SEARCH-->
        {if $CURRENT_PAGE != '' && $CURRENT_PAGE == 'search'}
            <a href="{$BASE_URL}">Home</a> > Search
        {/if}
    </div>

Because I don't want to hardcode every page I've written I'm trying to write a function like

Code:
{if $CURRENT_PAGE == 'ARTICLE'}{$article.page_title}{else} > <a href="{$BASE_URL}{$article.url}/">{$article.page_title}</a>{/if}

Problem is that I can't figure out what to use for ARTICLE in the code above. I've tried $article.url and $article.page_title but they don't work.

I'd also would like to use the $category[tmp].name instead of the $current_category, but $category[tmp].name doesn't work. Any suggestions?

=======

Anyone? Have hardcoded the pages as you can see, but I would love to write a function for them.

Last edited by evertsemeijn (2009-02-01 14:04:26)

Member of Jobberbase Development Team - Templates/Usability :: Looking for installation and/or custom design? :: Beautiful Wordpress themes

raghavsoni

Re: Breadcrumbs?

I think one should breadcrumbs only on job pages not on any other pages....
I use this code for job pages:
<a href="http://www.earnstop.com">Home</a> >> <a href="{$back_link}" title="home">{$current_category}</a> >> <a href="{$BASE_URL}job/{$job.id}/{$job.url_title}/" title="{$job.title}">{$job.title}</a>

hope it answered your query....

evertsemeijn

Re: Breadcrumbs?

Hi raghavsoni,

I don't agree with you that you should only use breadcrumbs on the jobpages. Using breadcrumbs makes that visitors get a better understanding of the structure of the website which can result in efficient search behavior.

So I think it's not only strange to only use it on the jobpages, but it's also not as constructive and consistent as using the breadcrumb on every page.

You might want to change your code into the following

Code:
<a href="{$BASE_URL}">Home</a> &raquo; <a href="{$BASE_URL}{$current_category}" title="{$current_category}">{$current_category}</a> &raquo; {$job.title}

because you normally don't link to the page currently being viewed and want to use character code for special characters.

My question still stands: how to code the articles without hardcoding everyone of them?

Member of Jobberbase Development Team - Templates/Usability :: Looking for installation and/or custom design? :: Beautiful Wordpress themes

navjotjsingh

Re: Breadcrumbs?

Maybe this should work:

Code:

{if $CURRENT_PAGE != ''}<a href="{$BASE_URL}">Home</a> &raquo; <a href="{$BASE_URL}{$page.url}/">{$page.title}</a>{/if}

This works for any page created through admin panel but it fails for others like RSS Feeds and Sitemap.