punctweb

Topic: increase the number of internal links

Because mister G (as in Google) loves internal linking in a website, let's give him what he wants smile

In the details page of a job, we will add two more links: "all jobs of the current company" and "all jobs in the same location"

Go go go !

Open /_templates/job.tpl and add this where you want the links to appear:

Code:

<a href="{$BASE_URL}jobs-at/{$job.company_alias}/" title="{$translations.jobs.all_from_company}">{$translations.jobs.all_from_company} {$job.company}</a> |
<a href="{$BASE_URL}jobs-in/{$job.location_alias}/" title="{$translations.jobs.all_from_location}">{$translations.jobs.all_from_location} {$job.location}</a>

Open /page_job.php and add these (starting from line 101):

Code:

        if($info['company'] != '') {
            $sanitizer = new Sanitizer();
            
            $info['company_alias'] = $sanitizer->sanitize_title_with_dashes($info['company']);
        }
        
        if($info['location'] != '') {
            $sanitizer = new Sanitizer();
            
            $info['location_alias'] = $sanitizer->sanitize_title_with_dashes($info['location']);
        }

Open /_includes/translations.ini and add these, in the [jobs] section:

Code:

all_from_company = "View all available jobs in"
all_from_location = "View all jobs in"

That's it, enjoy wink

evertsemeijn

Re: increase the number of internal links

Could you edit the post and name the function in which you have to post the code? Pages could be edited so line-numbers don't say anything in that case...

*edit* SOLVED:

I pasted it above

Code:
$smarty->assign('job', $info);
        $html_title = stripslashes($info['title']) . ' ' . $translations['jobs']['preposition_at'] . ' ' . stripslashes($info['company']) . ' / ' . SITE_NAME;
        $smarty->assign('current_category', $job->GetCategVarname($info['category_id']));
        $smarty->assign('back_link', BASE_URL . 'jobs/' . $job->GetCategVarname($info['category_id']) . '/');

Last edited by evertsemeijn (2009-02-12 00:11:14)

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