guillermo

Topic: How to: Remove / delete job types

You want to remove totaly the job types from the user interface? (Freelance, parcial o total time...)

There are some files you will need to update on the /templates/(your-template) folder.

First of all, find this line in all your files and simply delete them:
<img src="{$BASE_URL}_templates/{$THEME}/img/icon-{$job.type_var_name}.png" alt="{$job.type_name}" />

(Use a multiple files text finder! like ultraedit)

Open all-jobs-header.tpl and delete this line:
<a href="{$BASE_URL}{$URL_JOBS}/{$types[tmp].var_name}/" title="{$types[tmp].name}"><img src="{$BASE_URL}_templates/{$THEME}/img/icon-{$types[tmp].var_name}.png" alt="{$types[tmp].name}" /></a>

Open other-cities-jobs-header.tpl and delete this line:
<a href="{$BASE_URL}jobs-in-other-cities/{$types[job_type].var_name}/" title="{$current_category} {$types[job_type].name}"><img src="{$BASE_URL}_templates/{$THEME}/img/icon-{$types[job_type].var_name}.png" alt="{$types[job_type].name}" /></a>

Open cities-jobs-header.tpl and delete this line:
<a href="{$BASE_URL}{$URL_JOBS_IN_CITY}/{$city_ascii_name}/{$types[tmp].var_name}/" title="{$current_category} {$types[tmp].name}"><img src="{$BASE_URL}_templates/{$THEME}/img/icon-{$types[tmp].var_name}.png" alt="{$types[tmp].name}" /></a>

This way you remove all the visible job type from your web.

After this, we should remove the option from the Publish Post file.
Go to /_templates/(your-template)/publish-write.tpl

and search this code:

{section name=tmp2 loop=$types}
<input class="no-border" type="radio" name="type_id" id="type_id_{$types[tmp2].id}" value="{$types[tmp2].id}" {if !$job.type_id && !$smarty.post.type_id}{if $smarty.section.tmp2.first}checked="checked"{/if}{else}{if $types[tmp2].id == $job.type_id}checked="checked"{/if}{if $types[tmp2].id == $smarty.post.type_id}checked="checked"{/if}{/if} />
<label for="type_id_{$types[tmp2].id}"><img src="{$BASE_URL}_templates/{$THEME}/img/icon-{$types[tmp2].var_name}.png" alt="{$types[tmp2].name}" /></label>
{/section}

and replace with this:

{section name=tmp2 loop=$types}
<input type="hidden" name="type_id" id="type_id_{$types[tmp2].id}" value="{$types[tmp2].id}" />
{/section}

That's it!
Any questions please ask,
Guillermo Tamborero

--------

Eliminar / ocultar job types de la interfaz de usuario

Last edited by guillermo (2010-09-24 15:32:48)