Very often when maintaining sites in RedDot I get to the point when it becomes necessary to change or delete content elements, e.g. the default value of an image, or an entry of an option list, etc.
But doing so on a living project can get you into big trouble if you do not first check the consequences that this action will cause!
So what can we do to get a quick overview of the status of all pages based on a certain content class (that is what we need to get an idea of these consequences)?
The thing I prefer and what I would like to share today is using the Export Instances function, which can be found in the Action Menu at “Administer Content Classes” – (CK folder) – (CK) – “Instances”.
Every page/instance will be exported as one XML file. These files have the following structure:
<?xml version="1.0" encoding="UTF-8"?> <CONTENT_CLASS_NAME> <ELEMENT_NAME type="element_type">ELEMENT_CONTENT</ELEMENT_NAME> ... </CONTENT_CLASS_NAME>
The type attribute indicates the kind of element (standard field: 1, image: 2, option list: 8, etc.) as documented by RedDot. Some elements may have more attributes (e.g. images).
You will receive an e-mail as soon as the export is finished.
Open the command prompt (”Start” – “Run…” – enter “cmd”), go to the export folder and run the following code:
type *.xml > instances.xml
Open this file with a text editor and make it well-formed XML:
Regular expression experts can also delete all type=”…” attributes
Well, that’s all. Open the file with an XML editor or import it with Excel and do whatever you like or have to…
No related posts.