Hello, I took a look over this document: http://core.ebiotic.net/bin/edit/Draft/VelocityConcatenation and what I saw there is the fact that in the title there are 2 variables that you defined in the page content. The issue here is related to (as Sergiu said) some undefined variables. The title can contain only XWiki default variables (like $doc, $msg, $context ...) unless you define the variables somewhere in a template in a way that they will be available (defined) before displaying the title. See for example contentview.vm template. It contains the code for displaying the title of the current document. If you define those 2 variables in this template (before displaying the title), you will get the expected result. Raluca. On Wed, Oct 6, 2010 at 1:52 PM, Sergiu Dumitriu <[email protected]> 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.
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/VelocityConcate...
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
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs