Link Search Menu Expand Document

Filter Checkboxes

Filter summary blocks based on assigned categories. The summary block filter function is one of the mmore complex components available. It is important to understand how it works. When envoked, the function looks at two sources of information.

  1. A Google spreadsheet that contains valid categories for each grouping requested.
  2. It will look at the generated summary block blog items and pick out the assigned categories for each blog item.
  3. It will then build a list of check boxes (or radio buttons) based on the categories in blog items which match categories found in the spreadsheet.
  4. Then it builds html code flex boxes to display a thumbnail, title, excerpt and categories for each item in the blog/event.

Cook book to create a summary block

  • Edit the page
  • Click the “+” sign where you want the carousel to appear
  • Select “Code”
  • Copy and paste the below code block
  • Change the summary collection slug value (outreach-1) to the slug of the blog or event collection you want to reference.

Code block for Filter

<squarespace:query collection="outreach-1" limit="100">
  <script>
    createFilteredGallery(
      '#collectionData',
      {@|json},
      'grades,outreach');
  </script>
</squarespace:query>
<div id="collectionData"></div>

The above example has 2 groups (‘grades,outreach’), comma separated, of category selections.

  • grades: will be a group of grades checkboxes, labeled “Grades”.
  • outreach: will be a group of outreach checkboxes with the label “Outreach”.

Overrides:

None

Usage:

createFilteredGallery(SelectorID, json, Filters)

Parameters:

Parameter Description
Selector Required.
jQuery selector identification where the resulting html code will be generated.
json The value must be "{@|json}", which is a special SquareSpace replacement parameter.
Filters group<:[radio|checkbox]><:[label]>

Return Value:

None

Google Spreadsheet:

Detail Description
Owner grcrane319@gmail.com
File Name Categories
Folder aahom
Link Google Categories Spreadsheet
ID 1qrUPQu2qs8eOOi-yZwvzOuGseDFjkvj5_mSnoz0tJVc
Sheet Name Categories

Spreadsheet Fields

Column Label Description
A Group The group this category is assigned to
B Sequence The ordering of this category within the group
C Category The category abbreviated name
D Label The label, or long/full category name. This is the name as it should appear in the blog entry category name.
E Hide Hide=Yes will ignore this category