Inspired by Michaels idea and my need define rules that apply across sections of a tree, I decided that my approach would be to allow a child node to inherit the containers and rules of its ancestors.
The best way that I could see to do this was to modify the core containers.cfm. I hope that either Daemon like this idea or someone can suggest a better solution that does not require a core modification. The added code is clearly commented, and all existing functionality of containers remains intact.
The basis of this mod is to create a container within a template using the following naming convention. #stobj.objectID#_test!!inherit. The key part is using "!!inherit" to allow for the special processing in container.cfm.
What container.cfm does is look for "!!inherit" at the end of the container name. If found it will apply the rules for that instance, i.e. using the objectID of the page being displayed. If no rules are in that container, then it will look through the node's ancestors for containers with the same name until it finds one with rules. These rules will then be applied.
Please see the attached container.cfm for details. Although I have done preliminary testing, further testing will be needed to ensure that this works in all situations.
I know that we should not tamper with core, but I hope that this idea proves useful and finds it way into core for all to use.
Chris.
--- You are currently subscribed to farcry-dev as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
