Change log

File System

Most of the content management related assets and files used in Treepl CMS are accessible in the file system either via the admin File Manager or via FTP.

This open file structure allows you to manage your site content fully and easily via the methods you are most comfortable with and that suits your workflow.

File System Case Sensitivity

With the release of Treepl CMS version 6.10, the file system case sensitivity is changing from a case-insensitive file system to a case-sensitive file system.
For the majority of HTML and Liquid implementations throughout the CMS, within Page Content, Content Templates, Snippets, Module Layouts, etc. will be automatically checked for file paths and file names and converted to the appropriate case to avoid the breaking of existing implementations that may have letter case mismatches in the code.
Additionally, existing file naming conventions for system items will be enforced and automatically adjusted (where inconsistencies are present). For example; a Snippet with item name My Snippet and file system name of my_snippet.html will be converted to My Snippet.html.
Some obscure implementations may exist where the migration script will not be able to check or correct letter case mismatches in such places where Liquid tags, that point to a file path, are used within field/property values of a module item, along with other rare and custom implementations.
After v6.10, case sensitivity for the file system in general will need to be coded for with case-sensitive syntax in mind. For areas of the CMS such as Pages/Page Folders, System Pages, System Emails, and other system-managed items, the letter case syntax will be automatically controlled and enforced - except for situations involving FTP file/folder creation, where the CMS cannot enforce letter case rules.
See the following File System Case Sensitivity documentation for further explanations and examples.

Users who interact with FTP for site management/backup should take a fresh copy of all files and folders after the v6.10 migration to ensure your working copy includes any letter case updates.

The Treepl CMS file system is case-sensitive and will resolve folders and files only from a matching-case request.

For example; a file named MyReport.PDF stored in a root-level folder named My Files will only be accessible via a path request of /My Files/MyReport.PDF.
Using a different letter case anywhere in the file path, such as /my files/MyReport.pdf will not resolve to the desired file.

Files and folders with the same name but different letter case can exist together and be requested independently (providing the matching letter case is used).

For example; two files in the root-level folder My Files with the file names MyReport.PDF and Myreport.pdf are treated as separate files and can be accessed independently using paths /My Files/MyReport.PDF and /My Files/Myreport.pdf respectively.

The exception to this is system-managed Pages and Page Folders where the URL is mapped and content synced, to the CMS and where such items are only accessible via CMS-managed URLs.

For example; any .html file (such as Pages) will only be resolved from the case-sensitive URL generated by the CMS. Other name-matching .html files (but with a differing letter case) will not be recognised by the system and will not resolve.

A similar CMS mapping rule applies to CMS content files that are also accessible via the File Manager and/or FTP, such as Content Templates, Email Templates, Forms, Snippets, System Pages, System and Custom Emails, and module Layouts. However, in most of these modules, the file naming rule maintains the letter case of the item name. For example; giving a Snippet the name My Snippet would result in a CMS-mapped file name of My Snippet.html. But the above rules apply if renaming/changing the letter case of these files.

File Management via FTP

Creating or editing file names and directories via FTP is unrestricted and you can use any letter case syntax.

However, if a different letter case is used for system-managed items/pages they will not be recognised within the CMS.

For example; creating a Page via the admin called About Us, would, by default, create a file named about-us.html and there will be a ‘content sync’ and URL mapping between the two files.

If that file has its letter case changed, for example, to About-Us.html via FTP, the file will become disconnected from the CMS URL mapping and ‘content sync’ and upon the next save via the admin, the ‘About Us’ Page will recreate a new about-us.html file - alongside the original case modified file, since both files can exist.

Conversely, if no admin save operation is made to the ‘About Us’ Page and the case changed file of About Us.html has its content altered via FTP and subsequently the letter case restored to the original about-us.html, the file’s content still will not update in the CMS since the ‘content sync’ has been broken. Only upon an admin save action will the correct letter cased file be created and resynced and mapped to the CMS - subsequently overriding the existing file’s content with the last saved CMS version.

Therefore, it is important to observe and adhere to the letter case syntax of CMS-managed content to avoid URL mapping and content sync issues.

It is recommended to follow the below File Naming Best Practices when working with your Treepl CMS website, particularly when working via FTP.

File Naming Best Practises

When creating a page (or file) via FTP (or via the admin File Manager), please follow these best practises to avoid unpredictable result and/or errors:

0
Duplicate File Names

Do not create files with the same name but with different variations of the same file extension. Eg; myfile.html and myfile.htm

Doing so may result in inconsistent updating of file content when one or the other file is changed, along with other errors.

1
Empty File Names

Do not create files with an empty name (eg: .htm, .html).

The CMS logic of creating and changing the page via FTP, or via the admin File Manager, will ignore such files and will not result in the creation of a page.

2
Reserved URL Characters

Avoid using % and # characters in file names - particularly where these file names may be referenced in the URL (ie: as a link to a page or file). These characters are used in standard URL operations, therefore, including them in links/URLs can cause conflicts with existing URL constructs.

If these characters are to be used in your file naming, ensure any links/paths to such files are correctly URL encoded.

The URL encoding for these characters is listed below:

% –> %25
# –> %23

You can either manually encode these characters or make use of the Liquid filter url_encode.

Manual example:

// actual file name
<a href="/path/to/#my100%file.html">My Link</a>

// encoded file name
<a href="/path/to/%23my100%25file.html">My Link</a>

Liquid example:

{% assign fileSlug = "#my100%file.html" %}
<a href="/path/to/{{fileSlug | url_encode}}">My Link</a>
<a href="/path/to/%23my100%25file.html">My Link</a>

3
Folder and File Name Case Sensitivity

The Treepl CMS file system is case-sensitive and will resolve folders and files only from a matching-case request. Be sure to use matching letter case in your file paths and links.

For more information on system case sensitivity, see the File System article here.

Directory Structure

You have the freedom of creating your own folders and files within your sites directory structure. Keep in mind though, that Treepl CMS has certain directories/folders within a sites file structure which are utilised for system functionality (indicated below by the Treepl CMS icon ) and are either not accessible via the File Manager or should not be edited as they will be overriden with any version updates affecting those files.

The default system directory structure (and FTP access) is outlined below:

  • ROOT
  • cms-assets
    • css
      • event-calendar.min.css
      • jquery.fancybox.min.css
      • main.css
    • includes
      • event-calendar.inc
    • js
      • event-calendar.min.js
      • jquery.fancybox.min.js
      • payment.js
  • Contact
    • ContentTemplates
      • Master.html
    • EmailTemplates
      • System Default.html
    • Forms
      • [your form name].html
    • MenuLayouts
      • [your_menu_alias]
        • Default
          • item.layout
          • menu.layout
          • sub_items.layout
    • ModuleLayouts
      • Custom
        • [YourCustomModule]
          • Detail_Detail.html
          • List.html
      • System
        • Banner
          • List.html
        • BannerGroup
          • List.html
        • Blog
          • Blog List Layout.html
          • General Blog Layout_Detail.html
        • BlogPost
          • List.html
          • Post Detail_Detail.html
        • Event
        • EventGroup
        • FAQGroup
          • List.html
        • FAQQuestion
          • List.html
        • GallerySlider
          • Detail_Detail.html
          • List.html
        • ItemAuthor
          • Detail_Detail.html
          • List.html
        • Page
          • Page Detail_Detail.html
          • Site Search List.html
        • PageFolder
          • Folder Detail_Detail.html
        • Slide
          • List.html
    • Pages
      • home.html
    • Snippets
    • SystemEmails
      • confirm-email-notification.html
      • invoice.html
      • password-retrieve-email.html
      • secure-zone-login-details.html
      • workflow-notification.html
    • SystemPages
      • 401.html
      • 403.html
      • 404.html
      • default-page.html
      • email-confirmation.html
      • error-page.html
      • form-submission-results.html
      • request-reset-password-result.html
      • request-reset-password.html
      • reset-password.html
    • WorkflowEmails
  • _tmp


Related Articles

  • About Treepl CMS
    How Treepl CMS Works

  • About Treepl CMS
    Glossary of Terms

  • About Treepl CMS
    Infrastructure & Security

    Infrastructure Treepl CMS is fully hosted in Amazon Web Services (AWS) and it takes advantage...
  • About Treepl CMS
    Disaster Recovery Plan

    Backup Info Code and assets are stored on EBS volumes and are backed up twice...
  • About Treepl CMS
    Limits & Restrictions

    While system restrictions are inevitable, Treepl CMS aims to lift as many limitations to your development as possible.
  • About Treepl CMS
    Backlog & Requesting Features

    Treepl CMS is a community supported platform. Users and Partners are encouraged to vote in the backlog and request features.
  • Getting Started
    Website Templates

    Not only can you build your websites from your own custom code, framework or 3rd party templates, but you can also get started quickly by choosing from one of our beautifully designed, responsive templates to instantly create your next Treepl CMS website.

External Resources

There are currently no external resources available.

Please let us know if you have any other contributions or know of any helpful resources you'd like to see added here.


Questions?

We are always happy to help with any questions you may have.
Visit the Treepl Forum for community support and to search previously asked questions or send us a message at support@treepl.co and we will consult you as soon as possible.