Skip to end of metadata
Go to start of metadata

Below you can find the instructions how to add a new block under/above the 'Jobs by Category' and 'Jobs by City'
by the example of adding 'Jobs by State' block.

Note:To add a different block, for example Jobs by Country, Resumes by City (etc),

follow the given below instructions and use the values appropriate in your case:

I.e. in a case with "Jobs by Country" - you'll need to put 'Country'

where in the instructions below it is said to put 'State'.

 

Create a new Site Page

Go to Admin Panel -> Layout and Contest -> Site Pages -> Add a new User Page link

There will be the "Add a New User Page" form opened. Specify the following parameters there:

1) To the URI field enter /browse_by_state/:

2) Check the "Pass parameters via URI" check box:

3) Enter the desired title of the future block to the Title field (Browse by State)
 

4) In the Module drop-down list select "classifieds"

5) In the Function drop-down list select "browse"

Leave the "Template" field empty.

6) Then there will be additional fields appeared on the form.
To the very first of them enter "State", which means that the values for the block will be taken from the field with ID 'State':

Leave the rest fields of this kind empty.

7) In the "listing_type_id" enter "Job", which means that only listings of 'Job' type will be displayed in the block.

Enter needed number of columns you want to have in your block and total number of jobs you would like to show.

 

'Keywords and 'Descriptions' fields can be filled in if wanted.

Create a new Template via Admin Panel

A new template can be easily created via Admin Panel. Go to Layout and Content >> Edit Templates.
On the opened page you will see the "Add a New Template" form, which you need to use to create a new template

Template Name -enter a desired name for a new template, make sure to not use space characters, instead you can use '_'
Module Name - here you need to select a module/folder where the new template will be located.

Then press the "Add" button. A new template will be created and will appear in the templates table of the module you selected.

Once the template was created, go to edit this template. Insert the following code and press the "Save" button.

<ul class="browseListing">
   {foreach from = $browseItems item = browseItem name=browseItems}
      {if $browseItem.count > 0 && $smarty.foreach.browseItems.iteration <= 20}
         <li><a class='browseItem' href="{$GLOBALS.site_url}/browse_by_state/{$browseItem.url}/">[[$browseItem.caption]] <span class="blue">({$browseItem.count})</span></a></li>
      {/if}
   {foreachelse}
    <li>[[There are no listings with requested parameters in the system.]]</li>
   {/foreach}
</ul>

Create a New Template Via FTP

If version of your software is lower than 3.2 - a new template can be created via FTP.  You can find detailed intstructions on how to create a new template Via FTP here: http://www.smartjobboard.com/wiki/Add_new_Jobs_by_block

Edit Homepage template

1) Now you need to insert the code of the Jobs by State block to the Homepage template (main.tpl)
Go to Admin Panel -> Templates -> Edit Templates -> Main -> main.tpl

E.g. you want the new block to appear on the Homepage under the existing Jobs by City block.
Then in the main.tpl_code you first need to find the following part of the code that defines the _Jobs by City block display:

<h1 class="Category">[[Jobs by City]]</h1>
{module name="classifieds" function="browse" level1Field="City" listing_type_id="Job" browse_template="browse_by_city.tpl"}

 

Note: Scroll down to find this part of the code, as it is located in the end of the main.tpl code.
Or you can also use the "Find" function of your browser (usually it is Ctrl+F key combination)

 

2) Then right after_Jobs by City_ part of the code mentioned above you need to insert the similar to it code that defines Jobs by State block display.
Here it is:

<br>
<h1 class="Category"><nowiki>[[Jobs by State]]<nowiki></h1>
{module name="classifieds" function="browse" level1Field="State" listing_type_id="Job" browse_template="browse_by_state.tpl"}
</br>

Then press the "Save" button to save the changes you made.

3) That's it. Now you can go to the front-end homepage to review the newly created Jobs by State block, it should look the following way:

  • No labels