I was facing a problem like that some time ago ... and I decided to wrote Dummy Content Generator!
I know ... it doesn't look very impressive ... but still it is very useful. This small tool made my life simpler :)
How to use Dummy Content Generator
- First of all - crate page types which you want to use
- Create XML where you define how your dummy data should looks like
- Define where dummy data should be added (you can specify parent page ID)
- Run it!
As you can see in this example, tag pages contains one page tag which has following attributes:
- count - defines number of pages which will be generated based on this tag, 1 page in this case,
- type - page type which will be used,
- name - name of the page.
- properties - this is a list of properties which you want to set, in this case I don't want to set any properties, this is just an grouping node,
- children - list of the pages which will be generated under the page.
And properties ... here we have in general two options:
- <property name="Title" randomvalue="true"/>
It will create property with random value! How? Dummy Content Generator will detect property type and then it will open text file named in the same way as property type to get list of possible values.
For instance for property of type String it will open file EPiServer.Core.PropertyString.txt, for property of type URL to image it will use EPiServer.SpecializedProperties.PropertyImageUrl.txt and so on ...
This approach facilitates extending the Generator by custom properties. It's also very simple to change my dummy strings with your own one, maybe more meaningful.
- <property name="WriterName" value="Marek Blotny"/>
Above line will create property with specified value. It will not use random values! No magic here.
How to install Dummy Content Generator on EPiServer 5:
- Download zip file
- In EPiServer CMS Manager, select the existing EPiServer Web site and then
Action -> Install Module.
- Select DummyContentGenerator.zip to install and that should be all!
- To simplify creating the XML you can download schema from here.
- VS 2005 project with all sources can be downloaded from here.
- Sample XML
- This tool is on a very early stage, it was working for me well, but of course I didn't check all possibilities. It would be great to get some feedback from you, in particular please let me know if you find any bugs!
- If there will be an interest to improve or add new features to the Generator I'm willing to publish source code on EPiCode and help with improvements.