Skip to main content

PermitTempPdf and Conditional Shortcode

PermitTempPdf Shortcode

The use of permittemppdf is fairly straight forward.

The shortcode has two different arguments it can accept to change the information it will output: permit and vehicle.

 

Permit

Shortcode format:

  •  [permittemppdf permit=______]

The options to fill the blank space are:

  • barcode
  • permitno
  • lotshortname
  • lotname
  • location
  • expiry

Expiry will show a snippet of html that is not editable because of the complexity of the expiry information.

 

Vehicle

Shortcode format:

  • [permittemppdf vehicle=______]

The options to fill the blank space are:

  • plate
  • guest
  • year
  • colour
  • make
  • type


Conditional Shortcode

The conditional shortcode is somewhat complex.

It will only work with shortcodes that have been set it up for. Right now, that only includes the permittemppdf shortcode.

The formats that can be used are as follows:

  • [conditional var=****** test=!!!!!!!!]CONTENT[/condtional]
  • [conditional var=****** test=!!!!!!!! value=__________]CONTENT[/condtional]

This will test the value of ******. If the value is a success, then it will show the CONTENT.

The options for var currently are:

  • permittemp
  • permit

For example, to test if there are hours on a temp permit, the value would be: var=permittemp.hours

This is the variable name that has been defined (permittemp) and the case-sensitive column to return the information of.

The second argument "test" can take the following values:

  • hasvalue = if not empty or false, returns true
    • true = if the variable is a boolean true. i.e. 1, true, "true"
    • false = if the variable is a boolean false.
  • eq or equal = if the variable matches the contents of "value"
  • ne, neq or notequal = if the variable does not match the contents of "value"