How else do you call variables from one page into another?


#1

So, I got a page’s front matter like so

---
title: Rapid Scaling® Weekly
permalink: /weekly/
description: Witty collections...
layout: page
---

Now, on a different page, somewhere else, I wanna access the variables in this page’s front matter, so I do

{% assign newsletter_meta = site.pages | where: 'permalink', '/weekly/' %}

then expect {{ newsletter_meta.title }} and {{ newsletter_meta.oneliner_text }} to return those values, instead blank… my question is how else do you call variables from one page into another?


#2

The newsletter_meta variable is an array. Try {{ newsletter_meta[0].title }}.


#3

O, nice. That did it. Array, hmmm, why didn’t I think of that? But thanks a lot @chromatical for unstucking me!


#4

You’re welcome! :slightly_smiling_face: