Setup two level locations

Multi-location setup guide

By default SJS offers 3 sidebar search sections – Type, Category and Location.

sidebar-sections

 

 

 

 

 

Users who wish to use two level locations in the “State / City” or “County / City” format can do so. In this post we will cover basic steps how to setup multi-location jobs search with your SJS project.

 

Steps

a) Create a second location filter

There are 3 sidebar sections by default and if we want to use two of them for locations we will need to turn the “TYPE” section into a new location field. Job type seems to be less important and you can specify it for each job directly in the job’s description. This approach will allow users an option to search by “Main location / Sub location” and see the job type while keeping the process simple at the same time. If you prefer, you can also keep the job type and rather use the “CATEGORY” section instead.

 

b) Rename the section names:

Open Admin -> Translations -> Edit translations and search for “job_types” field. Rename it to “CITY”. After search for “cities” field and rename it to “STATE”. Alternatively put your own custom names. After translation clear the SJS cache from the admin top right menu. We also need to reorder the sections so that the CITY field will be right above the STATE. To do this, open “_tpl/default/snippets/sidebar-content.tpl”. You will see 3 HTML div sections. Take the second one that begins with “{if $dropdown_cats}” cut the whole section and paste it on top. This way we basically move the “CATEGORY” middle section to the first place so that the location fields can be listed together. Screenshot below shows the result:

sidebar-amended

 

c) Rename the section content:

In the next step open Admin -> Types and rename the fields to cities. In our example we added 4 cities from California and 3 cities from Texas. After change Admin -> Locations and add the states. For our purpose California and Texas have been added. Users should use custom locations and cities specific for their project. Screenshot below demonstrates the result:

 

new-sidebar-structure

 

c) Rename employer’s dashboard:

We also need to make sure that when companies post a job, they will see the newly updated sections. Open “_tpl/default/dashboard/views/post-first-step.tpl” and look for “post_category_label” field. Cut this HTML section and place it on top of the section where “post_type_label” is. This way, we again reordered the sections. Open “_tpl/default/dashboard/views/edit-job.tpl” and repeat the reordering one more time for job editing page.

Open the admin translations, find “post_type_label” and rename it to “City”. Also search & rename “jobs_type” into “City”. After find “post_location_label” and translate it to “State”. Clear the SJS cache afterwards. Screenshot displays the result:

 

job-post-reorder

 

After completing the steps above the job board should be smoothly running with multi-location search options.

 

d) Rename the admin panel (optional):

Users who wish to change the wording and rename the admin section can do this by following the next steps. Open “sjs-admin/_tpl/edit-post.tpl”, search for “Location” and rename it to “State”. This will update the admin job editing page. Final step is to reoder the sections properly in the “sjs-admin/_tpl/feeder-jobs.tpl” file. At this moment complete job board has been updated to work with multi-location search filters.

 

Download Simplejobscript HERE