I am running MODx 0961p2. I just want to confirm that the ’proper’ way to create a Directory in the document tree is to actually create a new blank document and then have it ’behave’ like a directory by making it the parent of documents that you place beneath (or, within) it. Is that right? Also, is it ok for a directory to act as both a published document in its own right as well as a container for other documents, or should directories generally be ’blank’ documents that simply act as containers for children documents?
Thanks much for any clarification here.
Thanks for the clarification, Ryan. Appreciate the support.
Marconi
-
☆ A M B ☆
- 24,524 Posts
All a "container" is is a document that has other documents using its ID as their "parent". When a document is specified as another document’s parent its "isparent" field is set to 1. Otherwise, it’s no different from any other document.
A good example of a document that is also a container/parent is a main News page. The "news" document itself will probably just have some heading text "Latest News from Mysite", and a Ditto snippet call to create a list of links with summaries to news articles. The news article pages themselves are stored under the main News document.
+ News
Article 1
Article 2
Article 3
(of course, this means that any third-party snippets that set parent values need to make sure to set the parent document’s "isparent" field!)