Exhibit/Functions

From SIMILE Widgets
Revision as of 01:21, 3 November 2015 by Tullyhansen (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Function details

  • union - the combination of two Exhibit Sets.
  • contains - checking if some property contains a string (pseudo equality checking).
    <div ex:content="if(contains(.has-final, 'true'), '+ final', 'NO FINAL')"></div>
  • exists - returns true if an item property exists.
    <div ex:content="if(exists(.url), .url, 'empty URL')"></div>
  • count - counts number of items related to a given property.
    <div ex:content="count(!lecture-section-of)"></div>
  • not - negates any of the other functions.
    <div ex:content="if(not(exists(.url)), .url, 'empty URL')"></div>
  • add - adds together the numerical elements of some Exhibit Set. See snippet below for example.
  • foreach - iterates through the set of items related to a given property. See snippet below for example.
  • date-range - converts the range of dates (specifically designated as that valueType) into a numeric value.
    • add(foreach(.presidency, date-range(.inDate, .outDate, 'day')))
  • concat - concatenates any number of properties and strings together.
    <div ex:content="concat('class-', .type, '-', .id)"></div>
  • distance
  • remove
  • now
  • multiply
  • min
  • max
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox