Each web page that I’m writing will have a set of files (eg, PDFs) associated with it that users can download.
I’m wondering about best practices for where I should place those files.
1. Should I create a folder for each page?
2. Where should these folders live? Eg, under
/documents/page1, /documents/page2, etc
or /assets/page1, /assets/page2
What do other folks do?
Thanks!
--Michael
-
MODX Staff
- 1,535 Posts
Well, my thoughts would be to upload the documents into assets/documents/1/ etc. where the number is the page ID.
Using the page ID would be the safest bet as page titles may change with time, but the ID is permanent for the lifetime of the page. Placing the documents inside the assets/documents folder is purely my preference, I just like to keep my MODx installs as self-contained and tidy as possible.
Garry Nutting
Senior Developer
MODX, LLC
Email:
[email protected]
Twitter: @garryn
Web: modx.com