Collection Integration
CB-Essay’s power comes from integrating collection items with your narrative. This essay shows you how to add your first collection item to an essay using a simple aside (margin note).
The Dual-Collection Model
CB-Essay manages two collections that work together:
- Essay Collection (
_essay/folder) - Your Markdown essay files with sequential navigation - Object Collection (CSV in
_data/) - Digital items (images, PDFs, audio, video) you reference in essays
Reference any collection item in your essays using its objectid.
Your First Collection Item
Collection items are stored in a CSV file in _data/. Each item needs at minimum:
objectid- Unique identifier (lowercase, no spaces)title- Item nameformat- File type (image/jpeg, application/pdf, etc.)
For complete metadata requirements, see Collection Integration docs.
Asides with Collection Items
The most common way to add collection items to essays is through asides (margin notes). Let’s look at two examples:
Text-Only Aside
Here’s a simple margin note.This aside contains only text - useful for brief explanations or commentary. The aside appears in the margin on desktop and inline on mobile.
Copy this:
{% include essay/feature/aside.html
text="Your margin note text here" %}
Aside with Collection Item
Moscow’s Administration Building
Click to view
Administration Building, University of Idaho, No. 30 was one of the first permanent structures on campus.
Copy this:
{% include essay/feature/aside.html
objectid="demo_001"
text="Context about this item" %}
The aside automatically shows the item’s thumbnail and links to its full page.
Note: The objectid must exist in your metadata CSV file in _data/.
More Aside Options
You can also use asides with:
- PDFs - Display document thumbnails
- Audio/Video - Show media icons with playback
- Custom captions - Override item titles
- Height control - Adjust image display size
See the Essay Features docs for complete aside options and other CollectionBuilder features like item cards, image galleries, timelines, maps, and subject clouds.
Example: Compound Objects
Some items have multiple parts (like a photo album with many images). These are called compound objects.
When you reference a parent objectid, CB automatically knows about its children:
Click to view
This lookout tower has multiple associated media files
{% include essay/feature/aside.html
objectid="demo_008"
text="This lookout tower has multiple associated media files" %}
The item page will show all child items together. See the Compound Objects docs for details.
Collection Pages
Your CSV metadata automatically creates these pages:
- Browse - Grid view of all items
- Map - Items with lat/long displayed geographically
- Timeline - Items with dates shown chronologically
- Subjects - Subject keyword cloud
- Locations - Location keyword cloud
- Data - Download metadata as CSV/JSON
No additional configuration needed - they work automatically!
Quick Start Workflow
To add collection items to your essays:
- Add items to your CSV: Create or edit
_data/your-metadata.csvwith objectids, titles, and formats - Reference in essays: Use objectids in asides or other includes
- Preview: Check that objectids resolve correctly
For detailed metadata setup, see the Get Started guide and Collection Integration docs.
Best Practices
- Use descriptive objectids (
admin_building_1909notimg001) - Don’t overwhelm your text - 3-5 asides per essay maximum
- Use asides for supplementary items, not primary content
- Optimize images - 1200px max width recommended
- Provide alt text in your metadata for accessibility
Print Considerations
Collection items work beautifully in print PDFs. Asides with images display as margin notes (if using aside-style: margin) or inline callouts.
See the Print Guide for full details on print output.
Next Steps
You now understand the basics of integrating collection items with CB-Essay!
Keep Learning
- CB-Essay Documentation - Complete reference including advanced collection features
- CB-CSV Documentation - CollectionBuilder reference for metadata and visualizations
- Metadata Guide - Detailed field specifications
Get Help
- CB Discussion Forum - Community support
- Open an issue - Report bugs or request features
Remember: Start simple with one or two collection items in asides, then explore advanced features as you need them. Copy the examples above and adapt them for your own work!