Shortcodes

4. Advanced shortcodes

gn:contact

The contact shortcode provides a fancy presentation for a point of contact which is marked up for easy detection and readability by both humans and search engines.

[gn:contact] type: gnwt-employee name: James Cracknell title: Systems Developer title@fr: Développeur de Systèmes org: Information Systems, Department of Justice, Government of the Northwest Territories org@fr: Infomatique, Département de Justice, Gouvernement des Territoires du Nord-Ouest street: 4903 49th St street@fr: 4903 49ième Rue locality: Yellowknife region: NT postal: X1A3W7 country: Canada phone: 767.9255 x82065 fax: 1 (867) 873 0127 email: james_cracknell@gov.nt.ca website: http://www.nwtcourts.ca attrs: gn-normalize-height: group:test-contact condition:vp-gt-tablet [/gn:contact]
James Cracknell
Systems Developer
4903 49th St
Yellowknife
NT
X1A 3W7
Canada

Many properties are automatically broken into several parts in the event that the property value contains a semicolon or comma. As in general english usage, the semicolon functions as a "super comma" and takes precedence over commas if one is present.

Contact parameters are subjected to a language merge before rendering. As such it is possible to define a contact having language-specific property overrides by appending an @ followed by the appropriate IETF language tag. This behavior is generally only useful in the event that a contact is embedded in a snippet, and as such can appear on pages in multiple languages.

The following contact properties and equivalent aliases are supported; note that certain properties only apply to specific contact types:

  • cell, cellular, cellphone
  • email, e-mail
  • fax, facsimile
  • hours
  • community, city, hamlet, locality, town, municipality
  • name
  • org, organization, employer
  • pmb (private mailbox)
  • phone, telephone, tel
  • pobox, postofficebox
  • postalcode, postal, postcode, zip, zipcode
  • region, province, territory, state, as a two-letter region code mapping to a configured region definition
  • street, address
  • title, position
  • type
  • url, homepage, website
Box types

A post office box is located at the post office, and is not to be confused with a private mailbox or simply box, which is designated PMB to avoid ambiguity.

The type property is required, and determines the schema.org type of the resulting contact which is reported to search engines. This is particularly important with regards to the relationship established between the contact and the organizations identified by the org property. The following contact types are supported:

Type Product
gnwt-employee Person who worksFor a GovernmentOrganization
gnwt-office GovernmentOffice branchOf a GovernmentOrganization
gnwt-org GovernmentOrganization
gnwt-post unnamed Person who worksFor a GovernmentOrganization
gnwt-service GovernmentService with a providing GovernmentOrganization
ngo-employee Person who worksFor an NGO
ngo-org NGO
ngo-service Service with a providing NGO
org Organization
person Person who worksFor an Organization
post unnamed Person who worksFor an Organization
service Service with a providing Organization

Note that the *-org contact types are used to represent both organizations, and organizational units. In the case of an organizational unit, parent organizations are specified using the org property as a comma or semicolon-separated list.

gn:elasticsearch

The elasticsearch shortcode generates a search interface backed by requests to an Elasticsearch service. This allows us to create a search interface which greatly simplifies the submission of searches restricted to a specific directory or filetype.

[gn:elasticsearch] url: https://Search:RKUoCeXDBZ3psNk3FwQDpbTk@5b353b473d3f1cd79f838179aed768d9.us-west-2.aws.found.io:443/index-fr,index/_search query: > { "bool": { "minimum_should_match": 1, "should": [ # Boosted relevance for matches in the title and url { "simple_query_string": { "query": "${query}", "fields": ["title^1.5","url^1.5","content"] } } ], "filter": [ { "prefix": { "url": "https://www.justice.gov.nt.ca/en/files/" } } ] } } [/gn:elasticsearch]
Enter search terms
Enter search terms above to get started. Use quotation marks to group search terms which must appear together into phrases.

gn:features

The features shortcode is used to present a set of features in boxes as commonly seen on commercial product pages.

The image and link feature properties are templated values with content_url, home_url, site_url, and theme_url provided.

[gn:features] columns: 2 center_last: yes features: - title: Feature 1 link: #link1 image: ${theme_url}/res/lib/gnwt-cue/img/sample/feature-box.1.jpg summary: This is the summary - title: Feature 2 link: #link2 image: ${theme_url}/res/lib/gnwt-cue/img/sample/feature-box.2.jpg summary: This is the summary - title: Feature 3 link: #link3 image: ${theme_url}/res/lib/gnwt-cue/img/sample/feature-box.3.jpg summary: This is the summary - title: Feature 4 link: #link4 image: ${theme_url}/res/lib/gnwt-cue/img/sample/feature-box.1.jpg summary: This is the summary [/gn:features]

gn:library

The library shortcode displays an interactive, recursive directory listing of a target directory within the library root - /en/files/ for English pages and /fr/fichiers/ in French. This directory is a mapping of folders accessible to you via network share.

The library shortcode's supports extensive and complex configuration options using inident syntax; however in most instances it suffices to point it at a folder using the default settings. If you want to explore advanced configuration options, you will need to consult the wp-justice plugin documentation.

[gn:library] # The target folder for the library path: coroner-service # The label of the root folder title: Documents # Filename identifying inident metadata files providing # additional information in the directory listing metafile: @.ind [/gn:library]
Documents

Related Pages

A complete alphabetical listing of the consolidated territorial Acts and associated regulations.
Contact the Department of Justice