Loading…
None
String updated in the repository |
|
None
Source string changed |
|
fgm1971
Translation changed |
|
fgm1971
Contributor joined |
Contributor joined
3 years ago
|
== Scripts ==
=== 1.0 Scripts ===
{{info}}In XWiki Syntax 1.0 it was possible to enter Velocity scripts anywhere directly in the page. This can lead to issues for example when the user was involuntarily entering Velocity content. It is also performance hungry for pages not requiring Velocity content. There are several other technical limitations. Same goes for entering Groovy scripts.{{/info}}
|=Feature|=XWiki Syntax 1.0
|Velocity script|((({{{
#set ($var = "whatever")
}}})))
|Groovy script|((({{{
<%
def var = "whatever"
%>
}}})))
=== 2.0 Scripts ===
{{info}}XWiki [[supports several scripting languages>>https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Scripting/]].{{/info}}
|=Feature|=XWiki Syntax {{velocity}}$crtSyntaxVer{{/velocity}}
|Velocity script|((({{{
{{velocity}}
#set ($var = "whatever")
{{/velocity}}
}}})))
|Groovy script|((({{{
{{groovy}}
def var = "whatever"
{{/groovy}}
}}})))
== Scripts ==
=== 1.0 Scripts ===
{{info}}En la Sintaxis XWiki 1.0 era posible añadir scripts Velocity directamente en cualquier lugar de la página, lo que podía provocar problemas, por ejemplo, cuando el usuario introducía contenido Velocity de forma involuntaria. También desperdiciaba mucho rendimiento en páginas que no necesitan contenido Velocity. Hay también otras limitaciones técnicas. Lo mismo aplica al añadir scripts Groovy.{{/info}}
|=Funcionalidad|=Sintaxis XWiki 1.0
|Script Velocity|((({{{
#set ($var = "lo que sea")
}}})))
|Script Groovy|((({{{
<%
def var = "lo que sea"
%>
}}})))
=== 2.0 Scripts ===
{{info}}En la Sintaxis XWiki 1.0 era posible añadir scripts Velocity directamente en cualquier lugar de la página, lo que podía provocar problemas, por ejemplo, cuando el usuario introducía contenido Velocity de forma involuntaria. También desperdiciaba mucho rendimiento en páginas que no necesitan contenido Velocity. Hay también otras limitaciones técnicas. Así que en la Sintaxis XWiki {{velocity}}$crtSyntaxVer{{/velocity}} los scripts Velocity se deben añadir con la macro ##velocity##. Lo mismo aplica al añadir scripts Groovy.{{/info}}
|=Funcionalidad|=Sintaxis XWiki {{velocity}}$crtSyntaxVer{{/velocity}}
|Script Velocity|((({{{
{{velocity}}
#set ($var = "lo que sea")
{{/velocity}}
}}})))
|Script Groovy|((({{{
{{groovy}}
def var = "lo que sea"
{{/groovy}}
}}})))