Hi,
it seems that articles does not use the default template that's been set in the settings.
i;m running 2.2pl and articles 1.4.3
i duplicated the sample templates that come with articles and assigned them in the settings of modx to be the default. but each time my client ads a new blog post the have the sample template.
bug? or my bad?
rdg
This is probably a little late.... but I think I may have the answer. I'm not sure if this is a bug or rather a limitation of Articles? Would be nice to see what @splittingred has to say about this to see if a report should be filed or not.
Anyhow, if you setup Articles leaving the template settings at their default and then create an Article to check it out only later to adjust the template setting in the container...it appears it doesn't have any effect on the Articles that were already created or imported.
I have two theories as to why this is the case, but haven't tested it enough or explored to code to try and figure it out for sure.
1.) All Articles contain a column in the database with a JSON array of all of the settings for Articles. It appears that changing the settings for the container doesn't also adjust the settings for the Articles that have already been created. Any new Articles created after a settings change on the container do in-fact inherit the adjusted settings. So depending on how Articles prioritize the settings...it's hard to say whether the container settings will be used or the values from the individual resource level JSON array.
2.) My second theory is that Articles operates just like normal resources do in that if you create a container resource, and then a child resource...the child resource will inherit the parents settings. However if you later change the template of the container (parent) resource...it wouldn't have any effect on the children (which is desirable behavior). Therefore, you would be required to go in and change the template manually of any child resources that you needed to. The only difference is the fact that the Articles container offers its children a separate template then its own by default, which leads me to believe that the somehow or another Articles get their initial template from that JSON array which is inherited from the container.
In any case, this doesn't seem to be sensible behavior to me. In my opinion, all Articles should be forced to hold to the settings of the articles container. Adjusting the "Article Template" setting should effect all Articles whether created before or after the change.
If the point of this setup is granular control...such as enabling commenting on a per article basis then I think there needs to be the ability to adjust those settings when editing an article directly as opposed to digging into the database.
I'm curious to know how that affects things like commenting...lets say you turn it off, but some of your articles still have the old setting in the JSON array with it on...what setting will be used?
A lot of these questions could certainly be answered by doing some testing, but I think the moral of the story is to configure your settings prior to adding any articles or importing any articles.
I'd love any feedback/advice from anyone with more knowledge on this subject!
Best of luck!
-Jared