About Folders
Folders play an integral part of the Baltic Content Framework. This section describes what you should know about them and how they interact with the articles they hold.
Basics
Folders are named containers of articles, and hold attributes that can affect the articles in the folder. Folders are part of what determines the site structure and its url mappings. Folders can be nested as much as you like although most people probably won't need to go down more than two or three levels. Consider the following folder structure:
-blog
|-2021
|-How To Cook Stew
|-Anatomy of Oranges
|-Best Roads
The blog folder sits at the root and contains a folder named 2021. You access the articles inside the 2021 folder as:
https://example.com/blog/2021/how-to-cook-stew
https://example.com/blog/2021/anatomy-of-oranges
https://example.com/blog/2021/best-roads
Keep in mind that these are defaults. You can assign the url mapping how you see fit.
Folders have properties that you can set. The template property allows you to specify which template to apply to the articles inside the folder. The default value for the template property is inherit, which means that the template is inherited from further up the hierarchy. More on templates later.
Sometimes, you want to present a listing of articles inside a folder as a table of contents and access it via the folder url. To do so, you can specify a default article for the folder and have that default article generate the table of contents. For example, you might want:
https://example.com/blog
https://example.com/blog/2020
These are urls to folders, not articles. When a folder has a default article, the url mapping system of Baltic Content Framework automatically forwards the request to the article. This technique is used at the top level of this documentation.
Comments