This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Atok
Atok

Can I Create Subdirectories of Pages, Partials, or Layout via User Interface?

philipptempel
philipptempel

Yes you can. Just precede the filename with the directory name i.e., CMS page bar with filename foo/bar is created in subdirectory foo. Similarly applies for partials and layouts.

Last updated

Atok
Atok

No. It does not create subdirectory (folder). I have tried it.

jriley
jriley

Yes.

You can create pages, partials, and layouts that are nested in a subfolder, either directly within the Backend area, or from your file system or text editor.

However, you can only go one level deep - you cannot have folders within folders. See this link for more details - this is by design.

CMS Pages Example:

[theme folder] / pages / about.htm - This is at the top level

[theme folder] / pages / subdirectory / nested-page.htm - This is a CMS page within a subdirectory, one level deep.

Note - If you use the Backend CMS for this, put the full path in the "Filename" field, not in the route field.

Partials Example:

[theme folder] / partials / header.htm - This is a partial at the top level

[theme folder] / partials / subdirectory / nested-partial.htm - This is a partial within a subdirectory, one level deep.

Layouts Example:

[theme folder] / layouts / home-layout.htm - This is at the top level

[theme folder] / layouts / subdirectory / nested-layout.htm - This is a layout within a subdirectory, one level deep.

Last updated

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.