Thanks Matteo You point out the blindingly obvious. Should have thought of that myself :-)
One remark about the code example: model.getImage() already returns a variation based on the whole cssClass resolving stuff, but StkUtil.getAssetVariation() expects an original variation. It works ok, because AssetWrapper.getVariation() delegates this call to the asset that it wraps, but all the stuff that model.getImage() does is unnecessary, and it's a pity you can't get the original asset from ImageModel. Thanks, Ernst 2010/2/12 Matteo Pelucco <[email protected]>: > > Ernst Bunders ha scritto: >> >> Hello >> >> I'm in the process of creating some custom imaging variations for >> paragraphs we have developed. I'm using the imaging module, and so I >> have to create css selectors that will match some css rule. >> >> I find this rather hard. > > I strongly agree with you. > It is better and more "agile" to build image variations "name-based". > You can simply say > > [#assign imageLink = stk.getAssetVariation(model.image, "primoPiano").link] > > where "primoPiano" is an imageVariation node name. > > > the problem is that model.image will produce some error message in > catalina.out. (I am on 4.1.1) > > HTH, > Matteo > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- > > -- Ernst Bunders Ontwikkelaar VPRO ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
