Last night, I spent the night fixing two things that I felt needed fixing for Articles. URI Generation, and the display of non-Articles Children...
URI Generation
While monkeying around with the DB, I noticed that Articles generated URIs for were wildy different from Resource URIs. The Articles gained its URI from the Alias of the Container and not from the URI of the Container. So, I changed it to the URI of the Container instead. This fixes all URLs so that no longer is a prepending slash required in chunks (even without base element which is supposed to be supplemental, not mandatory).
Note: Unfortunately, this means that I have to "unfix" all of my chunks.
Absentee Children
Rather than set the Container to hide_children, I set the Articles to not show_in_tree. This allows children that are not Articles to be shown (even other Containers) and be accessed in the Resource Tree. This still hides Articles completely as before. This allows drag-n-drop of Containers and nonArticles into Containers. It also allows "re-alignment" of URIs for Children not of Articles template in those Containers.
I would like to know if the author and rest of the community desires these two fixes. I personally feel that this makes Articles far more useful (for my circumstance) without affecting the general MODx population negatively at all. If so, I need to know how and where to submit them.
P.S.: This resolves the issues I was having with makeUrl() completely. makeUrl was not in fact broken, the URIs for Articles were causing the conflict completely.
P.P.S: This has been tested pretty extensively with creation of Articles and Containers inside and outside of the Manager, moving of Containers, and Publishing of Articles (which already used the Container's URI).
[ed. note: fuzzicallogic last edited this post 14 years, 1 month ago.]
-
☆ A M B ☆
- 2,213 Posts