Cascade title only to one folder in a branch bundle

I have placed some articles in a branch bundle in two folders for organizational purposes (the folders are not page bundles). Is it possible to cascade a front matter variable to one folder only?

Does your content structure look something like this?

content/
β”œβ”€β”€ books/
β”‚   β”œβ”€β”€ fiction/
β”‚   β”‚   β”œβ”€β”€ book-1.md
β”‚   β”‚   └── book-2.md
β”‚   β”œβ”€β”€ non-fiction/
β”‚   β”‚   β”œβ”€β”€ book-3.md
β”‚   β”‚   └── book-4.md
β”‚   └── _index.md
└── _index.md

If so, I’d cascade from your site config:

[[cascade]]
[cascade.params]
foo = 'bar'
[cascade._target]
path = '/books/fiction/**'

The content structure is indeed like that. I want to cascade the nested section’s title.

I don’t know what that means. In the example above, all books have .Section equal to β€œbooks”.

*Nested section. Your code works.

Edit: Sorry @jmooring this is a multilingual site. Any way to do the same for the secondary language?

I duplicated the code and added lang key.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.