Card

A card is a reusable link to a NationBuilder page. Cards are displayed by the Card Carousel, Card Grid, Card Row, and Filter Grid modules.

The module decides which pages to load and how to arrange them. The shared Card element decides what content each page displays.

#Shared Card Content

Card content NationBuilder source
Title Page headline, falling back to the page name
Description Page excerpt, when one has been added
Image Page meta image, when one has been added
Link The page URL, unless the Basic page uses the layout:redirect override described below
Filter categories Any page tags using the format filter:XXX

The whole card is clickable. Cards without a meta image display as text-only cards, except that a redirect card can fall back to its first attached image.

Card Layout by NationBuilder Page Type

The card layout is inferred from the card page's parent page. This means the same shared Card element can render different information when a module loads pages from a Blog, Calendar, or Basic page.

Page being rendered Card output
Blog Post in a standard Blog Meta image, headline, publication date, published author, excerpt, and “Read more”
Blog Post in a Blog whose slug contains resources The Resource card layout: meta image, headline, publication date, published author, excerpt, and “Read more”
Event in a Calendar Meta image, headline, event date and time, venue name, and excerpt. Multi-day events display a date range.
Basic page under a standard Basic parent page Meta image, headline, excerpt, and “Read more”
Basic page under a Basic parent whose slug contains resources The Resource card layout: meta image, headline, publication date, published author, excerpt, and “Read more”

If a listed field is empty in NationBuilder, that field is omitted from the card. All standard cards link to the page they represent.

Basic Page Redirect Cards

Use a redirect card when a Basic page needs to appear in a card module but clicking it should go to a different internal page or an external website.

  1. Create and publish a Basic child page within the Basic page used as the card module's data source.
  2. Add the card's visible headline and excerpt to the child page.
  3. Put only the destination URL in the Basic page content.
  4. Add the page tag layout:redirect.
  5. Add a meta image if the card needs an image. If there is no meta image, the card uses the first image attachment it can find.

Supported destinations are:

The layout:redirect tag takes precedence over the normal page-type layout. The card still displays the Basic page's headline and excerpt, but its link is taken from the Basic page content.

External destinations open in a new tab. Internal paths and absolute URLs on the Better Taxes domain open in the same tab. If the Basic page content is empty or is not a supported URL, the card safely falls back to linking to the Basic page itself.

Ordering Basic Page Cards

Card modules use the following ordering rules when their data source is a Basic page:

Use the parent page's Subnav pages settings when cards need a curated order. Pages excluded from that configured Subnav are also excluded from the card list.