Permalink URL containing .Parent

Is it possible to use the name of the parent folder in the URL of a page?

Something like “:parent” or “:Parent” does not work.

CRITICAL 2018/01/10 00:03:23 error expanding “/:Parent/:slug/” section “”: permalink ill-formed does not mention any variable or method which might do the job.

Alternately, can permalinks be manipulated via list.html or single.html templates?


I can’t say about other methods, but the basic rules are listed under “Permalink Configuration Values” here:

1 Like

Also I assume that having the section in permalinks is a form of this “parent” concept, in that a page under the section can have its section in its slug. Perhaps if you give a couple examples of what you are trying to accomplish?

So I’ve this folder structure

posts > Books >

and I want the URL for to look like “/Books/Post1/”.
If I use “:section” then I get the URL as “/posts/Post1/” instead.

What you want is not possible with the way you have organized your content.

You need to make /books/ its own section and then configure this books section permalink in your config.

Oh I see, thanks!