Skip to content

access front matter item in shortcode #2337

Answered by jjkress
btrem asked this question in Q&A
Discussion options

You must be logged in to vote

@btrem @pdehaan I hit the same thing today and after a bit of searching and inspecting, I found that you can indeed access the frontmatter data by using this.ctx.myItem -- but #1584 indicates that this may only work when using Nunjucks templates.

Leaving this answer here, so others may find the answer sooner 😉

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@pdehaan
Comment options

@btrem
Comment options

Answer selected by btrem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants