Modifier system

For the last week I’ve been working on the modifier system for Dlayer, it is one of the base systems that modifiers data in one module based on changes made in another. I’m building one modifier initially, container width, I’ll be adding more as I add new tools and enable the currently disabled tools.

Why do I need a modifier system and what does it do?

Everything in Dlayer relies on something else, for example, a page needs a template, a content item needs to go into a page block and a page block is directly related to a template block in the template that the page is based upon.

I’m trying not to force users to work a specific way or stop them going back and forth, for example, it will be possible to alter a template after you have created and populated one or more content pages with content.

If a user changes a template, for example they add a border to one of the blocks, the width of that block has to be updated to take into account the new border. There could then be any number of content items on pages that due to the width change now no longer sit in their block correctly or flow correctly.

This is where the modifier system comes in, if after a tool has processed there is a possibility that some content needs to be reviewed a request is sent to the base modifier system, it then asks one or more modifiers to check all the content to see what needs to be done and then process the changes.

My goal is that for the majority of the requests the modifier system can and will work out what needs to be done, in cases where user intervention is required changes will be made to as much data as possible and then notifications will be sent to users telling them about content or other items which they need to review themselves. I figure it is better to process 9 out of 10 requests and inform the user about the last 1 than stop the 9 requests happening because of 1.