I am inheriting an existing Sitecore implementation that has large content folders, all using the same template. Some of the folders contain literally hundreds of articles. Different folders should be of interest to different types of characters. I would not want articles on articles to set the Personas and Profile properties for each individual page. Ideally, I would like to enter properties only once for the entire article folder. What is the best practice then?
Should I create a different template for each type of article? Or is there a way to inherit these properties from the parent in the content tree?
thanks
EDIT
I had an online conversation with John West, CTO of Sitecore USA. Here are his suggestions for solving this problem. I thought to share them here, as some other people may be interested in solving a similar problem.
I do not know of any existing solutions for inheriting these values, but there are probably other approaches (possibly similar to rolling back the language).
If the number of templates is relatively small, I would probably go with an approach template - turn the existing template into a basic template for templates for all existing elements and change the insertion parameters accordingly. It would not hurt to put these things in folders, but they do not inherit these values in this way (you could implement something that would inherit them, as mentioned above). One of the advantages here is that you can update this data in standard values that apply to all elements based on these templates.
Another way would be to implement something like security layouts and presets, but for these other values.
No matter what you do, make sure that when the user creates a new item, they can use these properties every day, or they are automatically applied.
Another way would be to write a script that updates existing elements, but that doesn't help in future elements (unless you do something like a save handler to automatically apply the same values when creating). Perhaps copy the values from this parent folder.
I liked the idea of adding a logical field to an existing template that controls whether the element should copy the profile values from its direct parent, and then implement a save handler to copy when this field is set to true. So I asked John if there were any documents on how to create such handlers. Here is his kind answer:
This explains some of the ways in which you can click on position creation / change to set your values:
http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2010/11/Intercepting-Item-Updates-with-Sitecore.aspx
I assume you can use an element: a stored event handler. I avoid item: handlers created, because if my logic goes wrong, I want it to run again in the next save event. In your case, if these fields are empty, you probably want to set the value.
You can use factory to pass parameters to your event handler to avoid hard coding. For example, you can pass the database name wizard (abort the handler if the saved item is in another database) and a list of corrupted template identifiers. Then you can easily add templates to the list in the future.
http://www.sitecore.net/en/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2011/02/The-Sitecore-ASPNET-CMS-Configuration-Factory.aspx
Here is some event information:
http://sdn.sitecore.net/Articles/API/Using%20Events.aspx
This is an example that uses a save handler:
http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2010/06/Sitecore-Shared-Source-NewsMover-Categorizes-News-by-Date.aspx