Thank you pages from dynamic urls


So I have a downloadable list of contents, they each have a separate page so they are using following setup.

content folder
—downloads folder

Then in layouts I have the following
downloads folder

When I am on the site at downloads/alpha/
The user can request to download the file through a form and upon that submission I wish to go to

My question is how do I set up the thank-you page. I can’t figure out how to make it dynamic as I just get a 404 page. I can’t set up a url in the for it as I do not know what segment 2 is since it would be dynamic.


You can create a inside of a content folder. Example:


See what you can do with that.


That did the trick, only downside of it was my landing page that originally showed just the alpha, beta pages started listing the thank you pages also since I used.

{{ range ( where .Site.Pages “Section” “downloads” ) }}

The fix for this, I just created an extra field in the specific mds and not the thank you mds called download. So in alpha it would state download = true, allowing me to do the following

{{ range ( where .Site.Pages "" "true") }}

Content file structure was as you suggested. Is there a way to filter by md file name? That was my first idea but didn’t find any posts or docs that covered this.

We need to document this, but the page has a File object hanging off of it that can give you some additional information about the source file for the page.

{{ .File.LogicalName }} yields ""

File is of the type source.File. Documentation about that type is available at

A pull request is on the way: