Javascript is not enabled.

Javascript must be enabled to use this site. Please enable Javascript in your browser and try again.

Design System - IN BETA

Getting Started            Components            Presets             Templates

Contextual Content Component

The Contextual Content component dynamically shows state-specific content to users based on their location. For example, a user in Virginia sees Virginia-specific articles, while a user in Florida sees Florida content.

Content authors control what shows for each state by authoring Experience Fragments and mapping them in an ACS Commons Generic List.


What the User Sees

  • If the user's state is detected → they see the Experience Fragment for their state

  • If the state is unknown or not in the list → they see the "default" Experience Fragment

  • If nothing can be loaded → the component is hidden (no blank space)

All visible content (headings, articles, CTAs, images) is authored inside the Experience Fragment. The component itself has no visible UI — it just loads the right XF.


Supported Components Inside the XF

The Experience Fragments used with this component support the following components:

For the most reliable experience, stick to static content components: Title, Text, Button, Featured List/Tile (static, no pagination), Article Image, Container, and Separator. These render purely from HTML/CSS and are guaranteed to work. 

  • Component: Title
  • Notes: All heading levels, styles work

  • Component: Text
  • Notes: RTE content, links, formatting

  • Component: Button
  • Notes: Link buttons, all variants

  • Component: Separator
  • Notes: Spacing and divider lines

  • Component: Container
  • Notes: Layout structure

  • Component: Article Image
  • Notes: Images with lazy-loading — supported

  • Component: Featured List V2
  • Notes: Static tile grids (no "Load More" or tabbed filtering)


  • Component: Breadcrumb
  • Notes: Navigation breadcrumbs

  • Component: Download
  • Notes: File download links

  • Component: Embed
  • Notes: iframes and embed codes

Fully Supported Components (Recommended)

Risk with React components inside the XF: - Performance: The XF itself is fetched async. Then the React chunk must load. Then the component makes its own API calls. This stacks 2-3 network round-trips before content appears — users may see a brief empty/shimmer state. - Complexity: If the React component depends on events from other page components (e.g., UDD listens for LOCATION_SEARCH_TRIGGERED), timing may be unpredictable since it initialized later than normal. - Testing: These combinations are less commonly tested. Verify on staging before going to production. The Experience Fragments used with this component support the following components:

  • Component: Accordion
  • What Works: Expand/collapse panels
  • What Doesn't it do / Risk: N/A

  • Component: Carousel
  • What Works: Slides, navigation, dots
  • What Doesn't it do / Risk: N/A

  • Component:Tabs
  • What Works: Tab switching
  • What Doesn't it do / Risk: N/A

  • Component: Featured List with Pagination
  • What Works: TInitial tiles render
  • What Doesn't it do / Risk: "Load More" button, tabbed category filtering

  • Component: Location Search
  • What Works: Full functionality
  • What Doesn't it do / Risk: Adds extra JS chunk load (~50KB). Slight delay before the input renders since the React chunk must load after the XF injects.

  • Component: Slideshow
  • What Works: Full functionality
  • What Doesn't it do / Risk: Extra chunk load; slight delay before slides are interactive.

  • Component: Brightcove Video V2
  • What Doesn't it do / Risk: Requires external player SDK initialization — may not load

  • Component: Viafora Comments
  • What Doesn't it do / Risk: Requires SDK initialization — will not load

  • Component: Mega Menu
  • What Doesn't it do / Risk: Not appropriate for XF content

  • Component: Search Modal
  • What Doesn't it do / Risk: Not appropriate for XF content

  • Component: Coveo Search
  • What Doesn't it do / Risk: Not appropriate for XF content

Training

Setting up the prerequisites before using the Contextual Container component.

Create an Experience Fragment (XF) for each state you want to serve content to. All state use case XFs should be built under this path: (https://cms.aarp.org/aem/experience-fragments.html/content/experience-fragments/reusable-foundation-framework/english/features/states/state-curated-experience). 

Creating New Content

Updating Content

  • To update what a specific state sees: 1. Open the state's Experience Fragment in AEM Author 2. Edit the content (articles, CTAs, images, etc.) 3. Publish the XF

  • The change is immediately reflected wherever the Contextual Content component loads that state's XF.

 

4:30

Following the creation of the state XFs, it is time to add them to your generic list.

  • All states added to the generic list should be added to the following path: https://cms.aarp.org/generic-lists.html/etc/acs-commons/lists/state-curated.

  • Each entry in the list maps a state name to its Experience Fragment path. For example,:
    • Title = alabama
    • Value (XF path)  = /content/experience-fragments/reusable-foundation-framework/english/features/states/state-curated-experience/alabama/state-curated/master.

Important rules: - Titles must be lowercase state names (e.g., virginia not Virginia) - Always include a default entry — this is the fallback - Values must be the full XF path ending in /master.

 

3:07

Ready for Component Authoring

Now that the prerequisites are set up, the author can add this component to their page and author it. 

  • Open the page in AEM Author
  • Drag the Contextual Content component onto the page where you wish to add it. or add it using the plus symbol. 
  • Open the component dialog by selecting the wrench. 
  • Configure the Generic List Path field by entering in  /etc/acs-commons/lists/state-curated or browsing there. 
  • Select the check mark to close the component
  • Once done editing the page, publish the changes
2:00

Authoring Capability

The configuration dialog enables the content author to define the button's behavior, appearance, and interaction with a visitor on the page.

FAQs

Q: What determines the user's state? The AARP location service detects the user's state (via IP geolocation). It stores this in the browser as aarpState.

Q: Can I use this on multiple pages? Yes. The same component + generic list can be reused on any page (homepage, state pages, Now app). Just drop the component and point it to the same list.

Q: What if I add a new state later? Add a new entry to the Generic List and create its XF. No code changes needed.

Q: Can one XF be shared across multiple states? Yes. Point multiple list entries to the same XF path.

Q: Can I use a Featured List with 3 cards? Yes. A static featured list with 3 tiles (no "Load More", no tabbed filtering) works perfectly. Images, titles, links, and hover effects all work.

Q: Will videos work inside the XF? Brightcove Video is not recommended. The video player SDK may not initialize properly when loaded dynamically. Use static content instead.

Q: Can I use UDD or Location Search inside the XF? Yes, they are supported. However, they add extra loading time (chunk download + API calls) on top of the XF load. Users may see a brief empty/shimmer state before content appears. Test on staging first.

  • Generic List Path field -  This is the field that the author will enter the path for the generic list. for the states use case, they will enter the  (/etc/acs-commons/lists/state-curated).