Jobs API

Last edited: 11/22/2017

Also see the jobs overview article.

Display mode: list

Show

before_show, after_show

Here are the tags available to before_show in the job list:

Tag Description
__count__ The total number of jobs in the list.
show

Here are the tags available to show in job list (there may be some cases where the label on the form will not match perfectly with the available tag):

Tag Description
__title__ outputs the job title
__link__ the URL to the detail view
__organization__  
__website__ the website entered for the job
__location__  
__state__  
__category__ the category of the job
__categoryslug__ slug version of the category name
__description__  
__contact__ the phone number
__contactname__ the contact person name
__budget__  
__timeframe__
__hours__
__postdate__
__imageurl__
__extra1__ the timezone
__extra2__ the contact email address
group_show
Tag Description
__title__ the title of whatever we are grouping by
__slug__ slug version of the title
__subtitle__ the title of the second grouping parameter
__subslug__ slug version of the subtitle
__prevtitle__ the title of whatever we are grouping displayed at the bottom of the grouping
__prevslug__ slug version of prevtitle
__prevsubtitle__ the title of the second grouping parameter displayed at the bottom of the grouping
__prevsubslug__ slug version of prevsubtitle

Parameters

find_category

Only show items assigned to that category. Can find multiple categories with a comma separated list.

Example:

"find_category:category1,category2,category3",

hide_category

Will not show items assigned to that category.

Example:

"hide_category:category-slug,category-slug2",

find_state

Find a list of jobs in a given state.

Example:

"find_state:CA",

find_location

Find all locations with a given name. This parameter uses the literal contents of the location field (not the slug version).

Example:

"find_location:Hiring Place",

groupby

Sets a criteria to group the list by.

Available grouping criteria:

  • state
  • location
  • category

Example:

"groupby:state",

subgroupby

Sets a criteria to subgroup the list by. Requires the initial grouping "groupby".

Available subgrouping criteria:

  • state
  • location
  • category

Example:

"subgroupby:state",

order

Orders list.

Available grouping criteria:

  • recent

Example:

"order:recent",

howmany

Sets the maximum number of items to display

Example:

"howmany:3",

howmanydays

Find items from the next X days. If neither howmanydays nor howmany are specified, the list will continue until every job has been listed once.

Example:

"howmanydays:10",

howmany_category

Find a specific number of items for a specific category when using groupby.

Example:

"howmany_category:10",

 

Display mode: detail

Show

show

The same tags are available for display:detail as with display:list.

You will to need to add the following line at the end of your htaccess file (see article: how to add custom htaccess on monkcms sites) to define your job detail page (replace mcms_job-detail.php with your specific detail template).

rewriteRule ^([a-z0-9_-]+)/([0-9]+)-([0-9]+)-?([0-9]+)-([a-z0-9_-]+)?/?$ /mcms_job-detail.php?org=$1&job=$5&year=$2&month=$3&day=$4 [NC,L,QSA] 

Parameters

find

Find tags used for the detail view.

Example:

find:".$_GET['job']

find_org:".$_GET['org']

find_year:".$_GET['year']

find_month:".$_GET['month']

find_day:".$_GET['day']

Full Example

getContent(
   "job",
   "display:detail",
   "find:".$_GET[job],
   "find_org:".$_GET['org'],
   "find_year:".$_GET['year'],
   "find_month:".$_GET['month'],
   "find_day:".$_GET['day'],
   "show:__title__",
   "show:__postdate__",
   "show:__category__",
   "show:__location__",
   "show:__contact__",
   "show:__contactname__",
   "show:__description__"
);

 

Post a Job

To setup a job post form a monklet needs to be created and placed on a page.

Full Example

{
  tag="forms"
  display="box"
  find="job-post"
  title="Job Post"
  width="450"
  height="650"
  style="example.com/css/external.css"
  success="/job-added/"
}

Parameters

success

Where the user will be directed to upon successful completion. If not specified, the users is returned to the current page.

Example:

"success:/job-added/",

style

Specify a custom stylesheet for the iframe to use.

Example:

"style:example.com/css/external.css",