I am relatively new to Squiz Matrix but I understand that Page contents are divided up into blocks that are surrounded by div tags (sometimes two, if using a paint layout) unless specifically told not to (changing them to "Raw HTML" etc).
My question is: why is the product like this? It seems very strange. No one wants spurious div tags in their HTML. If they are required for editing purposes, they shouldn't be in the published source code. What purpose do they serve?
Also, is there a way to programmatically strip them from the published code?
I am not sure what the main reasoning behind this was when the product was first developed, but one benefit I can see is that it would force content to get cleared to a new line if it's not surrounded in a block style tag like a p tag. For example, if you add some text to 1 div inside a span, and also in the second div, the default display of it would be all in one line if the default divs didnt surround them.
To me the clearing behaviour is a hindrance rather than a help because there are cases when you do want content side by side (and this should be a decision made by the designer, not the CMS).
Thanks for the hint about the preferences but they aren't granular enough in my opinion - we do want the WYSIWYG editor, just not surrounded by div tags. This doesn't seem to be an option within the config available.
Do you know whether there is a way to clean the %asset_contents% of them - perhaps with a keyword modifier?
To me the clearing behaviour is a hindrance rather than a help because there are cases when you do want content side by side (and this should be a decision made by the designer, not the CMS).
Thanks for the hint about the preferences but they aren't granular enough in my opinion - we do want the WYSIWYG editor, just not surrounded by div tags. This doesn't seem to be an option within the config available.
Maybe you are missing the simplicity of how to fix this issue. Just go to Global Preferences and turn the Default Presentation Type to Raw HTM:
Change it and you never have to touch it again.
If you want content side by side that it up to you to build it and can easily be done with your own markup.
What Nick said, the setting I'm talking about only affects the presentation wrapper of the div, not the div content type. So you will still be able to use the WYSIWYG, but it won't get wrapped in a div by default.
Wouldn't you want to put side by side content in the same content div anyways? So that when the editor views the content in the editor, it is as close as possible to what will be presented on the front end?
Anyways, try that setting and let us know if that solves your problem.
I've tried this and it works fine in the _admin interface but Edit+ ignores it. Is there a way to get Edit+ to do the same?
This shouldn't be the case if you have changed the global setting for this. However, if you have a DIV that you created BEFORE you changed the setting, then it will still be set as a Block-level, which you will need to change to RAW HTML. Any new divs you create will use the new global settings.