On 31/03/2011 11:47, Thorsten Scherler wrote:
On Thu, 2011-03-31 at 11:23 +0200, Francesco Chicchiriccò wrote:
On 31/03/2011 11:02, Thorsten Scherler wrote:
Hi all,

I am looking for an
http://cocoon.apache.org/2.1/userdocs/core/image-reader.html in c3, but
have not found anything. Did I not look hard enough, or simply there is
no image reader yet?
Hi Thorsten,
upon reading your e-mail I've realized that in the cocoon3 samples there
was nothing about image reading, while the C3 reader is perfectly
capable of handling such requests, so I've just added and committed.

Basically, what you need is only changing what used to be (in C2.1)

<map:match pattern="images/*.gif">
<map:read src="read/{1}.gif" />
</map:match>

into

<map:match pattern="images/{filename}.gif">
<map:read src="read/{map:filename}.gif" />
</map:match>
Yeah, sweet that did the trick. :) I ended up to use {map:1} since it
closer to old school grammar. ;)

BTW we should add an example to implement the presentation layer stack
(css, js, images, ...) to give the people some c&p snippets.

You are definitely right: in the cocoon-sample module of cocoon3 sources there is already some JS, but the rest is still missing. In order to speed up the implementation of your idea, If you already have some snippets or working samples about this, we would be glad to include them in C3 sources.

If there is no image reader is there a note about best practice to
migrate a 2.1 component to 3.0?
Unfortunately there is no documentation about this, but any comment and
/ or request is very welcome from you :-)
I guess we should put together a small checklist since people have 2.X
components they want to migrate if switching to c3. For 2.2 ones which
are based on spring there is not much to change, but old avalon
components needs more work.

Nice idea: such checklist can start from some concrete examples and grow up to a more general approach in migrating from 2.X to 3. Again: do you have some of such concrete examples? ;-)

c3 does not support avalon based components any more, right?

Exactly.

Thank you very much Francesco (especially for your impressive QUICK reply)!

You're welcome :-)

--
Apache Cocoon Committer and PMC Member

http://people.apache.org/~ilgrosso/

Reply via email to