thriveweb/yellowcake

Working with pageContext

Closed this issue · 3 comments

zzrez commented

How to include pageContext, to pass more data from gatsby-node.js to a page? For example, to the template BlogIndex.js. I tried various routes, including below:-

// Export Template for use in CMS preview
export const TourIndexPageTemplate = ({
pageContext = [],
title,.......etc

{({ location }) => { const { tag, place } = pageContext .......etc

const BlogIndex = ({ pageContext, data: { page, posts, postCategories } }) => (

but although this did not produce an error, neither the pageContext variables tag nor place passed any value.

Hi @zzrez
Can you provide a link to the full file?

zzrez commented

Detailed question withdrawn. We used a different approach to solve this problem, which meant giving up with the yellowcake template which initially looked very promising. A pity.

Cool thanks for the feedback.