Sergiu Dumitriu wrote: > One thing is sure: this can't work in 1.x, since the title is displayed > before the content is parsed, so the velocity variables get their values > after you display the title. > > In 2.4 the title is printed after rendering the content, so it does > work, but the breadcrumbs are still printed before the content, so that > fails. > > So, to see if Velocity does work in your version, try using $doc.author > as the title and see what gets printed. If it's the literal > '$doc.author', then velocity isn't interpreted. If it prints a username, > like 'XWiki.Admin', then it is interpreted, and the problem is that > you're trying to use not-yet-defined variables. >
I think the situation is clear and Velocity does work here. As you said and coming back to the example... http://core.ebiotic.net/bin/Draft/VelocityConcatenation ... the variables defined in the content of the document are correctly printed in the title but not in the breadcrumbs. It works as expected because, as you said, the title is printed after rendering the content but the breadcrumbs are printed before that. As what I'm looking for is to include in the breadcrumbs variables defined in the content or values of properties of classes instantiated in the current document, I think the only solution is to get the breadcrumbs printed after the contents. Please, does it make sense for you? Could this be possible/advisable with the current rendering architecture? Thanks! Ricardo > On 10/06/2010 12:40 PM, [Ricardo Rodriguez] eBioTIC. wrote: > >> The same in a 2.4.x installation... clearly I'm failing to understand >> something. I'll be back to this issue in a couple of hours! >> >> http://core.ebiotic.net/bin/Draft/VelocityConcatenation >> >> Thanks! >> >> >> >> [Ricardo Rodriguez] eBioTIC. wrote: >> >>> Hi! >>> >>> Vincent Massol wrote: >>> >>> >>>> Do I assume that you've tried and it doesn't work? What did you try and >>>> what happens? >>>> >>>> >>>> >>>> >>> Sorry for being too poor in my previous message. I've tried and all what >>> I see is the code. For instance, if I set a value of a variable in the >>> body of document and I include it in the title, I see the name of the >>> variable, not its value. Please, see: >>> >>> http://xepecnet.environmentalchange.net/xwiki/bin/view/Draft/VelocityConcatenation >>> >>> It must be related with how the use of different renderers work with >>> different parts of a document. We are moving to a 2.x environment, so, >>> in this case, it will be great to have this working in this plain old >>> 1.3.x installation and I think that it will be good for my own >>> understanding of the new rendering architecture, but is by no means a >>> blocker for us. Thanks for your insight! >>> >>> Ricardo >>> >>> >>> > > > -- Ricardo RodrÃguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs