Skip to content

Releases: virginiacommonwealthuniversity/T4Utils2

Ordinal Indicators Enhancement

01 Jun 15:50
Compare
Choose a tag to compare

This update enhances the structure, performance, and extensiveness of the ordinalIndicators module; Here's how:

  • Both the pageInfo and groupInfo methods have been merged into one self-executing function: info
    • Now you can grab all page/group information via ordinalIndicators.info
  • More information about groups is available
    • ordinalIndicators.groupAmount - The total amount of groups on the page
    • ordinalIndicators.groupCount - The total amount of content within the current group
    • ordinalIndicators.groupID - The ID of the current group (zero-based)
    • ordinalIndicators.groupIndex - The index of the current piece of content within the group (zero-based)

publishCache Microsite Fix

20 Mar 12:36
Compare
Choose a tag to compare

This update fixes an issue with publishCache.microsite; This module variable is now working as intended. Here's some other updates:

  • T4Utils2 is dropping support for v7.4
    • The v7.4 release of 1.6.0 has been pulled for API discrepancies and errors
    • Maintenance of one utility file with drastically different API calls is no longer feasible
  • Build system files have been further simplified and upgraded to ES2015 (ES6)

publishCache Module

24 Feb 19:33
Compare
Choose a tag to compare

This update brings a much needed publishCache module to T4Utils. Here's what you can do with it:

  • publishCache.channel - Returns a data object containing information about the current channel
  • publishCache.microsite - Returns, if at all possible, a data object containing information about the current microsite

Check the source file to see the types of information you can pull from these objects!

generateT4Tag() v7 Bug Fix

19 Dec 19:50
Compare
Choose a tag to compare

This is a v7 bug fix for brokerUtils's module generateT4Tag(). Here's the scoop:

  • T4 was processing the tag templates before being loaded into a content type or page layout.
    • No matter how this module was used, an empty string was always returned
  • The first < of the tag template has been replaced with the unicode equivalent \u003C

generateT4Tag()

09 Dec 21:24
Compare
Choose a tag to compare

The brokerUtils module has been extended to include generateT4Tag()!

  • Create/process T4 tags by passing in a configuration object
    • type (content, media, navigation, title)
      • type - string
      • default - "content"
    • name
      • type - string
      • default - ""
    • output
      • type - string
      • default - "normal"
    • modifiers
      • type - array
      • default - []
    • id
      • type - number
      • default - 0
    • formatter
      • type - string
      • default - ""

v7.4 Support

31 Oct 18:09
Compare
Choose a tag to compare

T4Utils2 now officially supports both TerminalFour v7.4 and v8.1. Here's what's changed:

  • The Gulp build system now compiles 2 versions of the library (for TerminalFour v7.4 and v8.1)
    • The main gulpfile.js now uses a build module to simplify and bootstrap library compilation code
  • The ordinalIndicators module now uses replaceable strings for any v7.1/v8.1 API discrepancies
    • These replaceable strings are changed to the correct API calls during the build process
  • The elementInfo module has had undefined variable issues fixed
  • The media module's getImageVariantsIds method is now wrapped in a T4Utils.contextIsContent conditional

Global Context Variables

13 Oct 18:27
Compare
Choose a tag to compare

Issues related to the var context = content || null; problem within page-layouts have been solved. Here's how:

  • In page-layouts, the original way of calculating context errors out. The following logic works and will be utilized: var context = typeof content == 'undefined' ? null : content;
  • All new context, contextIsPage and contextIsContent member variables have been added to the base T4Utils object
    • This ensures that the context is defined globally at the start of the library
    • The modules brokerUtils, elementInfo and ordinalIndicators now utilize these member variables in their logic

Ordinal Indicators Failsafe

12 Oct 16:55
Compare
Choose a tag to compare

A new failsafe has been added to ordinalIndicators to allow for the entire library to be used within page layouts. Here's what's changed:

  • All code within pageInfo/groupInfo has been wrapped in a conditional checking to see if the global variable content is undefined
    • If content is defined, the self-executing functions will run as expected
    • If content is undefined, the self-executing functions will return objects with null key/value pairs

Ordinal Indicators - pageCount

22 Sep 14:25
Compare
Choose a tag to compare

A new pageCount member variable has been added to ordinalIndicators.

  • Returns the amount of content (of the kind in which the variable is called) on the page

Ordinal Indicators Optimization

16 Sep 15:00
Compare
Choose a tag to compare

ordinalIndicators have been optimized in a few ways for speed and efficiency, and new features have been added. Here's what's changed:

  • New functions pageInfo and groupInfo have been added
    • pageFirst, pageIndex, and pageLast are now aliases for key/value pairs pageInfo returns
    • groupFirst and groupLast are now aliases for key/value pairs groupInfo returns
  • Comments are more contextual
  • Syntax is simplified to utilize cleaner, more understandable code