indude

Topic: Remove Job title from Permalinks ?

Hello,

I would like to remove the job title from the permalink of Jobs.

Default is http://www.jobberbase.com/demo/fordel/3 … -at-yigit/
I want http://www.jobberbase.com/demo/fordel/396/

I followed tutorial on this page (http://www.jobberbase.com/forum/topic11 … -jobs.html) for the same but there is nothing like "<a href=”{$BASE_URL}job/{$job.id}/{$job.url_title}/” title=”{$job.title}”>{$job.title}</a> " in /public_html/job/_templates/default/posts-loop.tpl and there is no posts-loop.tpl in _templates/posts-loop.tpl

hobo

Re: Remove Job title from Permalinks ?

http://www.jobberbase.com/forum/post10064.html#p10064

just remember to add the forward slash to the url /

Your replacement line for template files would be:

"{$BASE_URL}{$URL_JOB}/{$job.id}/"

Tutorial you refer to is for older version.

Last edited by hobo (2010-08-17 00:56:05)

indude

Re: Remove Job title from Permalinks ?

I followed the tutorial, it worked partially only.
When i visit any job, it shows a url like http://www.jobberbase.com/demo/396// rather then http://www.jobberbase.com/demo/396/

I'm sure, I did everything fine and reviewed too.

hobo

Re: Remove Job title from Permalinks ?

Try using in your template files?:

"{$BASE_URL}{$URL_JOB}/{$job.id}"

see what happens.

indude

Re: Remove Job title from Permalinks ?

I removed that trailing slash, still that problem.

hobo

Re: Remove Job title from Permalinks ?

Did you remove it in both files: home.tpl and jobs-list.tpl?
Did your clear browser cache or your jobberbase template cache folder.

hobo

Re: Remove Job title from Permalinks ?

In home.tpl you need to change this line 3 times, for sponsored links, latest jobs and most applied jobs.

"{$BASE_URL}{$URL_JOB}/{$job.id}"

will give you url like:

http://www.jobberbase.com/demo/fordel/396

while:

"{$BASE_URL}{$URL_JOB}/{$job.id}/"

will give you this:

http://www.jobberbase.com/demo/fordel/396/

I just tested it on latest version, i see only job page has extra //.

Update...

Just figured it out... in root folder open page_job.php and edit lines:

line 61
from:

redirect_to(BASE_URL . URL_JOB .'/' . $id . '/' . $info['url_title'] . '/');

to:

redirect_to(BASE_URL . URL_JOB .'/' . $id . '/');

And also line 70 from:
$url = BASE_URL . URL_JOB .'/' . $id . '/' . $info['url_title'] . '/';

to:

$url = BASE_URL . URL_JOB .'/' . $id . '/';

Good luck.

Last edited by hobo (2010-08-17 18:41:55)

indude

Re: Remove Job title from Permalinks ?

I further and removed . '/' and got a clean url like http://www.jobberbase.com/demo/fordel/396
Thanks for the solution.

It will be nice if anyone can answer my question here http://www.jobberbase.com/forum/topic27 … tions.html

Last edited by indude (2010-08-17 19:10:39)

hobo

Re: Remove Job title from Permalinks ?

Hi,
The modification above is not complete!

You also need to modify the link for your rss page output to avoid duplicate pages.
In _includes/class.Feed.php around line 95 find:

Code:

$properties['description'] .= '<a href="' . BASE_URL . URL_JOB .'/' . $job['id'] . '/' . $job['url_title'] . '/' . '">Apply to this job</a><br />';
$properties['link'] = BASE_URL . URL_JOB .'/' . $job['id'] . '/' . $job['url_title'] . '/';

and replace it with:

Code:

$properties['description'] .= '<a href="' . BASE_URL . URL_JOB .'/' . $job['id'] '">Apply to this job</a><br />';
$properties['link'] = BASE_URL . URL_JOB .'/' . $job['id'] ;