Filters Module

More information is available for extending themes with filters.

Filters Functions & Variables

The Filters Module features the following functions:


filters.accounts(blockstrap, data) - back to top

This filter will return an array of the current accounts and will also convert each account balance to a float.

- back to top


filters.avatars(blockstrap, data) - back to top

This filter will return an image with the avatar CSS class using data.option('your_photo').

The data object can be used to set a default image if your_photo is not stored locally within the options.

- back to top


filters.balances(blockstrap, data) - back to top

This filter will return an array of objects containg the transaction counts and balances of each account.

- back to top


filters.bootstrap(blockstrap, data) - back to top

This filter will return rendered HTML content using data.type as a snippet ID and the entire data object as the data.

More information can be seen in bootstrap assets.

- back to top


filters.contacts(blockstrap, data) - back to top

This filter will return an array of the current contacts.

- back to top


filters.get(blockstrap, data) - back to top

This filter uses data.find to return the value defined by data.collection and data.key.

- back to top


filters.got(blockstrap, data) - back to top

This filter uses data.find to return a boolean based upon having value defined by data.collection and data.key.

- back to top


filters.last(blockstrap, data) - back to top

This filter returns a text string containing information pertaining to when the last transaction made by any accounts took place. The following data atrributes can be used to modify the results as follows:

- back to top


filters.plugin(blockstrap, data) - back to top

This filter will return the results from the relevant plugin unless the plugin required plugin function cannot be found, in which case it will return the data. Data attributes required include:

The results would derive from $.fn.blockstrap.plugins[data.name][data.call](data.data).

- back to top


filters.setup(blockstrap, data) - back to top

This filter will return the results from $.fn.blockstrap.core.filter(blockstrap_setup_steps[data.step]).

It is used in conjunction with the ever-so complicated core.setup function, which allows for a step-by-step process.

- back to top


filters.total(blockstrap, data) - back to top

This filter will return the results from accounts.total(rate, prefix).

The default value for rate is usd and the default value for prefix is US$. These can be overriden using data.rate and data.prefix.

- back to top


filters.txs(blockstrap, data) - back to top

This filter will return a rendered HTMl list of transactions for the defined account ID (data.id) and the length can be set via data.limit - defaulting to 7.

- back to top


  1. Related Articles
  2. Back to Modules
  3. Accounts
  4. API
  5. Buttons
  6. Contacts
  7. Blockchains
  8. Data
  9. Filters
  10. Forms
  11. Security
  12. Styles
  13. Templates
  14. Table of Contents