Home

Issue: 376

Accessing route properties in layout

[issue link]

Is there an API for or best practice way to access route properties from inside layout files?

for example if I had a route structure where the top level route (eg: site.com/[this bit]/otherstuff) would change the tag line next to a logo.

I could make two seperate headers, but it seems a little redundant given how little data is changing and the fact it’s only one bit of data. I could pass the value into it across multiple pages but that’s a lot of repetition of data as pages grow. It seems to make far more sense to have a context aware header.

Is this possible?

This question is available on Nuxt.js community (#c327)