Closed pigeonflight closed 11 years ago
It would be awesome if you could help us out with some examples. I think we should add an "Examples" section in the readme.
I think creating an image should just work the same way as adding a file. Something like this should work:
{
"_path": "path/to/image",
"_type": "Image",
"title": "image title",
"image:file": "files/examplefile.txt"
}
I've not yet added news items nor collections.
The inflator already includes the criterion adder section of plone.app.transmogrifier
, so adding collections should already work.
I'm gonna add some tests for images, news items and collections for making sure that it really works :wink:
Recently we've started to develop a policy package (onegov.policy) with the inflator. It is not yet production ready so there are still some issues but it uses bundles and content creation, so you could take a look at it for having some more examples.
Nice!.... will do some testing and see how it goes. Is there a way to add a News Item that includes an image?
The News Item has an image field, so you could do something like this:
[
{"_path": "foo/news-item",
"_type": "News Item",
"title": "the title",
"text": "news item text",
"image:file": "images/news.jpg"}
]
The path to the image file images/news.jpg
is relative to the location of the json file.
This is extremely useful. Beyond sweet!
Could you include examples of adding a News Item, Collection and Image in your documentation. I see reference to the idea of a File. I've created my first bundle, but it would help to get some of these examples, perhaps a more thorough example of a bundle, it doesn't explicitly say that you need to create your own Plone add-on.
I'm willing to write this, if you point me in the right direction.