How to create a macro ?
Hi How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ? Regards Roopesh
From what I understand, there's two ways to do it. One, add it to macros.vm in your skin directory. Two, put it in a .vm file you include in the document you need to use it in (using #template("filename.vm")). Anyone know if there any better ways?
-Tom -- Tom Kliethermes eSupport Initiatives IBM Information Management (913) 599-7240 Fax: (913) 599-8590 http://www.ibm.com/software/data roopesh@digitalglue.in 04/25/2007 02:19 AM Please respond to xwiki-users@objectweb.org To xwiki-users@objectweb.org cc Subject [xwiki-users] How to create a macro ? Hi How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ? Regards Roopesh -- You receive this message as a subscriber of the xwiki-users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
You can also create your macro in a page and then load that page using the #includeMacros macro wherever you need it. See http:// www.xwiki.org/xwiki/bin/view/Code/IncludeMacrosMacro -Vincent On Apr 25, 2007, at 5:02 PM, Thomas Kliethermes wrote:
From what I understand, there's two ways to do it. One, add it to macros.vm in your skin directory. Two, put it in a .vm file you include in the document you need to use it in (using #template ("filename.vm")). Anyone know if there any better ways?
-Tom
-- Tom Kliethermes eSupport Initiatives IBM Information Management (913) 599-7240 Fax: (913) 599-8590 http://www.ibm.com/software/data
roopesh@digitalglue.in 04/25/2007 02:19 AM Please respond to xwiki-users@objectweb.org
To xwiki-users@objectweb.org cc Subject [xwiki-users] How to create a macro ?
Hi
How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ?
Regards Roopesh
-- You receive this message as a subscriber of the xwiki- users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws
-- You receive this message as a subscriber of the xwiki- users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws
Hi everyone, I've discovered a new possibility today that we need to document. In the Administration page, in the Advanced tab there's a "Velocity Macro Pages" field. You can put in there the name of a page containing Velocity macros and that will make those macros available from all pages. I haven't tried it yet though. Hope it helps, -Vincent On Apr 25, 2007, at 5:16 PM, Vincent Massol wrote:
You can also create your macro in a page and then load that page using the #includeMacros macro wherever you need it. See http:// www.xwiki.org/xwiki/bin/view/Code/IncludeMacrosMacro
-Vincent
On Apr 25, 2007, at 5:02 PM, Thomas Kliethermes wrote:
From what I understand, there's two ways to do it. One, add it to macros.vm in your skin directory. Two, put it in a .vm file you include in the document you need to use it in (using #template ("filename.vm")). Anyone know if there any better ways?
-Tom
-- Tom Kliethermes eSupport Initiatives IBM Information Management (913) 599-7240 Fax: (913) 599-8590 http://www.ibm.com/software/data
roopesh@digitalglue.in 04/25/2007 02:19 AM Please respond to xwiki-users@objectweb.org
To xwiki-users@objectweb.org cc Subject [xwiki-users] How to create a macro ?
Hi
How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ?
Regards Roopesh
-- You receive this message as a subscriber of the xwiki- users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http:// www.objectweb.org/wws
-- You receive this message as a subscriber of the xwiki- users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http:// www.objectweb.org/wws
To expand on Thomas's second option, you can actually put either the macro definition or a directive including the document containing it into the view template of your skin (to make it global as you desired). This can be done either by modifying /templates/view.vm or the "view" field of your skin (which, if non-empty, will override view.vm). And to clarify his reply slightly, the original macros.vm is actually in the /templates directory. If you wish your macro to be global, regardless of the skin, I think you will want to edit that one instead of the one in your skin directory. This is apparently a change from the pre-1.0 days, when the skins directories didn't contain template files - I presume that they are now copied there from /templates when a skin is created. Vincent (or anybody), can you confirm this? Are these files actually copied whenever a skin is created, or only when a custom version of the file's content is desired? Also, as Vincent mentions in an intervening reply, you can load macros from an XWiki document rather than from a file, using the #includeMacros macro (which, in 0.9.8 brain[sic] ________________________________ From: Thomas Kliethermes [mailto:kliether@us.ibm.com] Sent: Wednesday, April 25, 2007 10:02 AM To: xwiki-users@objectweb.org Subject: Re: [xwiki-users] How to create a macro ? From what I understand, there's two ways to do it. One, add it to macros.vm in your skin directory. Two, put it in a .vm file you include in the document you need to use it in (using #template("filename.vm")). Anyone know if there any better ways? -Tom -- Tom Kliethermes eSupport Initiatives IBM Information Management (913) 599-7240 Fax: (913) 599-8590 http://www.ibm.com/software/data roopesh@digitalglue.in 04/25/2007 02:19 AM Please respond to xwiki-users@objectweb.org To xwiki-users@objectweb.org cc Subject [xwiki-users] How to create a macro ? Hi How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ? Regards Roopesh -- You receive this message as a subscriber of the xwiki-users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Hello, I applied exactly the solution proposed by Brian in my Wiki (see his answer below) : create macros in a specific wiki document, import it with an #includeMacros macro located inside the "View" field of my skin, like this: ### ### Main "view" template ### ### General wrapper for view actions ### [.......] </div>## main #template("endpage.vm") #includeMacros('XWiki.MyMacros') #end My problem is that the macro includeMacros adds {pre} / {/pre} tags that get rendered, and so appear in all pages. I cannot put them inside the "content" of the page, because I would have to overload the "contentview.vm" file, in which is declared the "xwikicontent" div. How can I get rid of those {pre} {/pre} tags ? I would like to avoid overloading the "contentview.vm" because I think it's not a good thing to do (it's not in the default templates, but in the skins) ... Thanks, Jérémie ________________________________ From: THOMAS, BRIAN M (ATTSI) [mailto:bt0008@att.com] Sent: mercredi 25 avril 2007 18:58 To: xwiki-users@objectweb.org Subject: RE: [xwiki-users] How to create a macro ? To expand on Thomas's second option, you can actually put either the macro definition or a directive including the document containing it into the view template of your skin (to make it global as you desired). This can be done either by modifying /templates/view.vm or the "view" field of your skin (which, if non-empty, will override view.vm). And to clarify his reply slightly, the original macros.vm is actually in the /templates directory. If you wish your macro to be global, regardless of the skin, I think you will want to edit that one instead of the one in your skin directory. This is apparently a change from the pre-1.0 days, when the skins directories didn't contain template files - I presume that they are now copied there from /templates when a skin is created. Vincent (or anybody), can you confirm this? Are these files actually copied whenever a skin is created, or only when a custom version of the file's content is desired? Also, as Vincent mentions in an intervening reply, you can load macros from an XWiki document rather than from a file, using the #includeMacros macro (which, in 0.9.8 brain[sic] ________________________________ From: Thomas Kliethermes [mailto:kliether@us.ibm.com] Sent: Wednesday, April 25, 2007 10:02 AM To: xwiki-users@objectweb.org Subject: Re: [xwiki-users] How to create a macro ? From what I understand, there's two ways to do it. One, add it to macros.vm in your skin directory. Two, put it in a .vm file you include in the document you need to use it in (using #template("filename.vm")). Anyone know if there any better ways? -Tom -- Tom Kliethermes eSupport Initiatives IBM Information Management (913) 599-7240 Fax: (913) 599-8590 http://www.ibm.com/software/data roopesh@digitalglue.in 04/25/2007 02:19 AM Please respond to xwiki-users@objectweb.org To xwiki-users@objectweb.org cc Subject [xwiki-users] How to create a macro ? Hi How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ? Regards Roopesh -- You receive this message as a subscriber of the xwiki-users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Hello all, Sorry, Vincent Massol already answered with the new possibility of referencing the macro page in administration part. I confirm : it works ! Thanks, Jérémie ________________________________ From: BOUSQUET Jeremie [mailto:Jeremie.BOUSQUET@gemalto.com] Sent: jeudi 3 mai 2007 10:50 To: xwiki-users@objectweb.org Subject: RE: [xwiki-users] How to create a macro ? Hello, I applied exactly the solution proposed by Brian in my Wiki (see his answer below) : create macros in a specific wiki document, import it with an #includeMacros macro located inside the "View" field of my skin, like this: ### ### Main "view" template ### ### General wrapper for view actions ### [.......] </div>## main #template("endpage.vm") #includeMacros('XWiki.MyMacros') #end My problem is that the macro includeMacros adds {pre} / {/pre} tags that get rendered, and so appear in all pages. I cannot put them inside the "content" of the page, because I would have to overload the "contentview.vm" file, in which is declared the "xwikicontent" div. How can I get rid of those {pre} {/pre} tags ? I would like to avoid overloading the "contentview.vm" because I think it's not a good thing to do (it's not in the default templates, but in the skins) ... Thanks, Jérémie ________________________________ From: THOMAS, BRIAN M (ATTSI) [mailto:bt0008@att.com] Sent: mercredi 25 avril 2007 18:58 To: xwiki-users@objectweb.org Subject: RE: [xwiki-users] How to create a macro ? To expand on Thomas's second option, you can actually put either the macro definition or a directive including the document containing it into the view template of your skin (to make it global as you desired). This can be done either by modifying /templates/view.vm or the "view" field of your skin (which, if non-empty, will override view.vm). And to clarify his reply slightly, the original macros.vm is actually in the /templates directory. If you wish your macro to be global, regardless of the skin, I think you will want to edit that one instead of the one in your skin directory. This is apparently a change from the pre-1.0 days, when the skins directories didn't contain template files - I presume that they are now copied there from /templates when a skin is created. Vincent (or anybody), can you confirm this? Are these files actually copied whenever a skin is created, or only when a custom version of the file's content is desired? Also, as Vincent mentions in an intervening reply, you can load macros from an XWiki document rather than from a file, using the #includeMacros macro (which, in 0.9.8 brain[sic] ________________________________ From: Thomas Kliethermes [mailto:kliether@us.ibm.com] Sent: Wednesday, April 25, 2007 10:02 AM To: xwiki-users@objectweb.org Subject: Re: [xwiki-users] How to create a macro ? From what I understand, there's two ways to do it. One, add it to macros.vm in your skin directory. Two, put it in a .vm file you include in the document you need to use it in (using #template("filename.vm")). Anyone know if there any better ways? -Tom -- Tom Kliethermes eSupport Initiatives IBM Information Management (913) 599-7240 Fax: (913) 599-8590 http://www.ibm.com/software/data roopesh@digitalglue.in 04/25/2007 02:19 AM Please respond to xwiki-users@objectweb.org To xwiki-users@objectweb.org cc Subject [xwiki-users] How to create a macro ? Hi How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ? Regards Roopesh -- You receive this message as a subscriber of the xwiki-users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Hi Jeremie, I'm glad it works. If you've got a few minutes it would be great if you could document this on xwiki.org in the developer guide somewhere. Thanks a lot :) -Vincent On May 9, 2007, at 11:45 AM, BOUSQUET Jeremie wrote:
Hello all,
Sorry, Vincent Massol already answered with the new possibility of referencing the macro page in administration part.
I confirm : it works !
Thanks,
Jérémie
From: BOUSQUET Jeremie [mailto:Jeremie.BOUSQUET@gemalto.com] Sent: jeudi 3 mai 2007 10:50 To: xwiki-users@objectweb.org Subject: RE: [xwiki-users] How to create a macro ?
Hello,
I applied exactly the solution proposed by Brian in my Wiki (see his answer below) : create macros in a specific wiki document, import it with an #includeMacros macro located inside the "View" field of my skin, like this: ### ### Main "view" template ### ### General wrapper for view actions ### [.......] </div>## main #template("endpage.vm") #includeMacros('XWiki.MyMacros') #end
My problem is that the macro includeMacros adds {pre} / {/pre} tags that get rendered, and so appear in all pages. I cannot put them inside the "content" of the page, because I would have to overload the "contentview.vm" file, in which is declared the "xwikicontent" div.
How can I get rid of those {pre} {/pre} tags ? I would like to avoid overloading the "contentview.vm" because I think it's not a good thing to do (it's not in the default templates, but in the skins) ...
Thanks,
Jérémie
From: THOMAS, BRIAN M (ATTSI) [mailto:bt0008@att.com] Sent: mercredi 25 avril 2007 18:58 To: xwiki-users@objectweb.org Subject: RE: [xwiki-users] How to create a macro ?
To expand on Thomas's second option, you can actually put either the macro definition or a directive including the document containing it into the view template of your skin (to make it global as you desired). This can be done either by modifying / templates/view.vm or the "view" field of your skin (which, if non- empty, will override view.vm).
And to clarify his reply slightly, the original macros.vm is actually in the /templates directory. If you wish your macro to be global, regardless of the skin, I think you will want to edit that one instead of the one in your skin directory. This is apparently a change from the pre-1.0 days, when the skins directories didn't contain template files - I presume that they are now copied there from /templates when a skin is created.
Vincent (or anybody), can you confirm this? Are these files actually copied whenever a skin is created, or only when a custom version of the file's content is desired?
Also, as Vincent mentions in an intervening reply, you can load macros from an XWiki document rather than from a file, using the #includeMacros macro (which, in 0.9.8
brain[sic]
From: Thomas Kliethermes [mailto:kliether@us.ibm.com] Sent: Wednesday, April 25, 2007 10:02 AM To: xwiki-users@objectweb.org Subject: Re: [xwiki-users] How to create a macro ?
From what I understand, there's two ways to do it. One, add it to macros.vm in your skin directory. Two, put it in a .vm file you include in the document you need to use it in (using #template ("filename.vm")). Anyone know if there any better ways?
-Tom
-- Tom Kliethermes eSupport Initiatives IBM Information Management (913) 599-7240 Fax: (913) 599-8590 http://www.ibm.com/software/data
roopesh@digitalglue.in 04/25/2007 02:19 AM Please respond to xwiki-users@objectweb.org
To xwiki-users@objectweb.org cc Subject [xwiki-users] How to create a macro ?
Hi
How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ?
Regards Roopesh
-- You receive this message as a subscriber of the xwiki- users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws
-- You receive this message as a subscriber of the xwiki- users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws
On May 11, 2007, at 12:05 PM, Vincent Massol wrote:
Hi Jeremie,
I'm glad it works. If you've got a few minutes it would be great if you could document this on xwiki.org in the developer guide somewhere.
Hmm... looks like the answer is no... Someone up for doing this? I'll do it if nobody can help but I'd like to focus on the RC5 release for now. Thanks -Vincent
Thanks a lot :) -Vincent
On May 9, 2007, at 11:45 AM, BOUSQUET Jeremie wrote:
Hello all,
Sorry, Vincent Massol already answered with the new possibility of referencing the macro page in administration part.
I confirm : it works !
Thanks,
Jérémie
From: BOUSQUET Jeremie [mailto:Jeremie.BOUSQUET@gemalto.com] Sent: jeudi 3 mai 2007 10:50 To: xwiki-users@objectweb.org Subject: RE: [xwiki-users] How to create a macro ?
Hello,
I applied exactly the solution proposed by Brian in my Wiki (see his answer below) : create macros in a specific wiki document, import it with an #includeMacros macro located inside the "View" field of my skin, like this: ### ### Main "view" template ### ### General wrapper for view actions ### [.......] </div>## main #template("endpage.vm") #includeMacros('XWiki.MyMacros') #end
My problem is that the macro includeMacros adds {pre} / {/pre} tags that get rendered, and so appear in all pages. I cannot put them inside the "content" of the page, because I would have to overload the "contentview.vm" file, in which is declared the "xwikicontent" div.
How can I get rid of those {pre} {/pre} tags ? I would like to avoid overloading the "contentview.vm" because I think it's not a good thing to do (it's not in the default templates, but in the skins) ...
Thanks,
Jérémie
From: THOMAS, BRIAN M (ATTSI) [mailto:bt0008@att.com] Sent: mercredi 25 avril 2007 18:58 To: xwiki-users@objectweb.org Subject: RE: [xwiki-users] How to create a macro ?
To expand on Thomas's second option, you can actually put either the macro definition or a directive including the document containing it into the view template of your skin (to make it global as you desired). This can be done either by modifying / templates/view.vm or the "view" field of your skin (which, if non- empty, will override view.vm).
And to clarify his reply slightly, the original macros.vm is actually in the /templates directory. If you wish your macro to be global, regardless of the skin, I think you will want to edit that one instead of the one in your skin directory. This is apparently a change from the pre-1.0 days, when the skins directories didn't contain template files - I presume that they are now copied there from /templates when a skin is created.
Vincent (or anybody), can you confirm this? Are these files actually copied whenever a skin is created, or only when a custom version of the file's content is desired?
Also, as Vincent mentions in an intervening reply, you can load macros from an XWiki document rather than from a file, using the #includeMacros macro (which, in 0.9.8
brain[sic]
From: Thomas Kliethermes [mailto:kliether@us.ibm.com] Sent: Wednesday, April 25, 2007 10:02 AM To: xwiki-users@objectweb.org Subject: Re: [xwiki-users] How to create a macro ?
From what I understand, there's two ways to do it. One, add it to macros.vm in your skin directory. Two, put it in a .vm file you include in the document you need to use it in (using #template ("filename.vm")). Anyone know if there any better ways?
-Tom
-- Tom Kliethermes eSupport Initiatives IBM Information Management (913) 599-7240 Fax: (913) 599-8590 http://www.ibm.com/software/data
roopesh@digitalglue.in 04/25/2007 02:19 AM Please respond to xwiki-users@objectweb.org
To xwiki-users@objectweb.org cc Subject [xwiki-users] How to create a macro ?
Hi
How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ?
Regards Roopesh
Hi all, I have again problems with macros, contained in a page (XWiki.MyMacros). This page is referenced in XWiki.XWikiPreferences, in field "Velocity Macro Pages", value being "XWiki.MyMacros". It used to work well with 0.9.840 and 1.0, all macros were correctly interpreted in all pages. But now from 1.1M3 and 1.1M4 it does not work anymore ... Do you have any idea why it wouldn't work anymore ? Also, during wiki migrations, I did not reimport last XWiki.XWikiPreferences pages, to keep my preferences. Could it explain the problem ? Do you advise reimporting the last versions (1.1M4) of XWiki.XWikiPreferences page ? Also, how is it possible for such pages (XWiki core) to compare them to the old ones, and to see if there are differences ? Thanks for your help, Best regards, Jeremie ________________________________ From: BOUSQUET Jeremie [mailto:Jeremie.BOUSQUET@gemalto.com] Sent: mercredi 9 mai 2007 11:46 To: xwiki-users@objectweb.org Subject: RE: [xwiki-users] How to create a macro ? Hello all, Sorry, Vincent Massol already answered with the new possibility of referencing the macro page in administration part. I confirm : it works ! Thanks, Jérémie ________________________________ From: BOUSQUET Jeremie [mailto:Jeremie.BOUSQUET@gemalto.com] Sent: jeudi 3 mai 2007 10:50 To: xwiki-users@objectweb.org Subject: RE: [xwiki-users] How to create a macro ? Hello, I applied exactly the solution proposed by Brian in my Wiki (see his answer below) : create macros in a specific wiki document, import it with an #includeMacros macro located inside the "View" field of my skin, like this: ### ### Main "view" template ### ### General wrapper for view actions ### [.......] </div>## main #template("endpage.vm") #includeMacros('XWiki.MyMacros') #end My problem is that the macro includeMacros adds {pre} / {/pre} tags that get rendered, and so appear in all pages. I cannot put them inside the "content" of the page, because I would have to overload the "contentview.vm" file, in which is declared the "xwikicontent" div. How can I get rid of those {pre} {/pre} tags ? I would like to avoid overloading the "contentview.vm" because I think it's not a good thing to do (it's not in the default templates, but in the skins) ... Thanks, Jérémie ________________________________ From: THOMAS, BRIAN M (ATTSI) [mailto:bt0008@att.com] Sent: mercredi 25 avril 2007 18:58 To: xwiki-users@objectweb.org Subject: RE: [xwiki-users] How to create a macro ? To expand on Thomas's second option, you can actually put either the macro definition or a directive including the document containing it into the view template of your skin (to make it global as you desired). This can be done either by modifying /templates/view.vm or the "view" field of your skin (which, if non-empty, will override view.vm). And to clarify his reply slightly, the original macros.vm is actually in the /templates directory. If you wish your macro to be global, regardless of the skin, I think you will want to edit that one instead of the one in your skin directory. This is apparently a change from the pre-1.0 days, when the skins directories didn't contain template files - I presume that they are now copied there from /templates when a skin is created. Vincent (or anybody), can you confirm this? Are these files actually copied whenever a skin is created, or only when a custom version of the file's content is desired? Also, as Vincent mentions in an intervening reply, you can load macros from an XWiki document rather than from a file, using the #includeMacros macro (which, in 0.9.8 brain[sic] ________________________________ From: Thomas Kliethermes [mailto:kliether@us.ibm.com] Sent: Wednesday, April 25, 2007 10:02 AM To: xwiki-users@objectweb.org Subject: Re: [xwiki-users] How to create a macro ? From what I understand, there's two ways to do it. One, add it to macros.vm in your skin directory. Two, put it in a .vm file you include in the document you need to use it in (using #template("filename.vm")). Anyone know if there any better ways? -Tom -- Tom Kliethermes eSupport Initiatives IBM Information Management (913) 599-7240 Fax: (913) 599-8590 http://www.ibm.com/software/data roopesh@digitalglue.in 04/25/2007 02:19 AM Please respond to xwiki-users@objectweb.org To xwiki-users@objectweb.org cc Subject [xwiki-users] How to create a macro ? Hi How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ? Regards Roopesh -- You receive this message as a subscriber of the xwiki-users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
The Velocity docs will be better to explain this, as I really don't understand it well. However, as I understand it, Velocity loads globally-scoped macros from a single file, which in XWiki is macros.vm, located in the /templates directory. And, in case you don't already know it, the instructions - such as they are - are available at velocity.apache.org (to my mind, the site is organized a little oddly: from the main page's left-side menu you have to pick "Engine" from the "Development" submenu, which gets you to a page whose left menu has a "Docs" section, under which "User Guide" and "VTL Reference" are the most useful, particularly the latter). brain[sic]
-----Original Message----- From: roopesh@digitalglue.in [mailto:roopesh@digitalglue.in] Sent: Wednesday, April 25, 2007 2:19 AM To: xwiki-users@objectweb.org Subject: [xwiki-users] How to create a macro ?
Hi
How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ?
Regards Roopesh
roopesh-2 wrote:
Hi
How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ?
Regards Roopesh
-- You receive this message as a subscriber of the xwiki-users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
I guess the term 'macro' is used in two different contexts, the velocity macro, explained here http://velocity.apache.org/engine/releases/velocity-1.4/user-guide.html#Velo... or the XWiki macro with examples here http://www.xwiki.org/xwiki/bin/view/Code/Macros They are not the same as I understand and it might be helpful to use a different term for the Xwiki macros, something like 'utility'? Uwe -- View this message in context: http://www.nabble.com/How-to-create-a-macro---tf3643619.html#a10183333 Sent from the XWiki- Users mailing list archive at Nabble.com.
On Apr 25, 2007, at 5:35 PM, Oova wrote:
roopesh-2 wrote:
Hi
How can I create my own macro in my xwiki (say, a macro for adding two numbers). Where should I write it. So that I can use it from any page ?
Regards Roopesh
-- You receive this message as a subscriber of the xwiki- users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http:// www.objectweb.org/wws
I guess the term 'macro' is used in two different contexts, the velocity macro, explained here http://velocity.apache.org/engine/releases/velocity-1.4/user- guide.html#Velocimacros or the XWiki macro with examples here http://www.xwiki.org/xwiki/bin/view/Code/Macros
They are not the same as I understand and it might be helpful to use a different term for the Xwiki macros, something like 'utility'?
Yes, you're right: one is called "Radeox Macro" and the other is called "Velocity Macro". -Vincent
participants (6)
-
BOUSQUET Jeremie -
Oova -
roopesh@digitalglue.in -
Thomas Kliethermes -
THOMAS, BRIAN M (ATTSI) -
Vincent Massol