Hi,

In syntax 1.0 you could use include to declare global velocity macros for
example (including a page containing these macros where you want to use
them).

In syntax 2.0 as far as I understand you don't need to use {{include}} to
create or include macros, you'd better use {{macro}} wich allows clear
parameters. Include is used for what it is, including a page in another
page, for example for templating, or splitting a complex page in sub-pages.
I believe you can still use {{include}} if you want to include a large
number of utility methods (kind of library), defined as velocity macros or
as a groovy class. It would be easier maybe than to write all the
corresponding {{macro}}s.

Jeremie


2010/2/23 Meng Wu <meng...@yahoo.com>

> Stefan,
>
> When you want to duplicate one macro over several pages. For example, if
> you look closely at the document index page source, it's actually including
> three different types of tables: tableview, treeview, etc. I believe you can
> implement dynamic ajax indexes using the include macro, just like the
> document index livetable, but you'll have to look more into that. Basically,
> having three separate self defined instances of those tables would create a
> lot of clutter, but using the include macro may remove much of that.
>
> The include method is a great scripting technique and way to remove
> clutter, thus improving usability and allowing easier code upgrades.
>
>
> Felix
>
>
>
> ----- Original Message ----
> From: stefan bachert <stefanbach...@yahoo.de>
> To: users@xwiki.org
> Sent: Tue, February 23, 2010 2:23:39 PM
> Subject: [xwiki-users] self defined macros OR include
>
> Hi,
>
> in generell self defined are more flexible than to use an {{include}}
>
> Are there circumstances were {{include}} offers advantages?
>
> Stefan Bachert
>
> __________________________________________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz
> gegen Massenmails.
> http://mail.yahoo.com
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
>
>
>
>
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to