XWiki Syntax Guide

Última modificação por xcape em 2021/04/15 15:33

XWiki Syntax 2.1 » Programming

XWiki Syntax 2.1: Programming

Macros

2.0 Macros

There is only one kind of macro in XWiki Syntax 2.1, which is called by the syntax: {{macroname param1="value1" ... paramN="valueN"}}...{{/macroname}}. For macros without content there's a short notation: {{macroname param1="value1" ... paramN="valueN"/}}

FeatureXWiki Syntax 2.1Result
Rendering Macro with a content
{{code language="java"}}
System.out.println("Hello World!");
{{/code}}
System.out.println("Hello World!");
Rendering Macro without content

{{include reference="Space.Page"/}}

The referenced page is included in the current page

For the full list of available macros check the Extensions wiki.

Macros in this wiki

IdNameCategoriasDescriptionVisibilidade
activityFluxo de AtividadeNotificationsInforma sobre o fluxo de atividades recentes dos usuários da wiki atual. Lista os eventos criar, editar e remover de páginas, comentários, anexos e anotações.Current Wiki
asyncMacro assíncronaConteúdoExecute de forma assíncrona e/ou armazene em cache o conteúdo da macro.Global
attachmentGalleryPickerAttachment PickerDesenvolvimentoGrid based attachment picker.Global
attachmentSelectorSelecionador de AnexosDesenvolvimentoUm controle a ser usado por propriedades de objetos do documento atual que deveriam conter o nome de um anexo de um documento destino. Permite subir novos anexos ou removê-los do documento destino. Se nenhum documento destino for informado, o documento atual será usado. As propriedades dos objetos, no entanto, são salvas somente no documento atual.Current Wiki
boxCaixaFormataçãoDesenha uma caixa em volta de qualquer conteúdo.Global
cacheCacheDesenvolvimentoFaz cache de conteúdo.Global
chartGráficoConteúdoPermite exibir uma gráfico gerado de diversas fontes de dadosGlobal
childrenChildrenNavegaçãoDisplays a tree of children pages of the current pageCurrent Wiki
codeCódigoFormataçãoRealça pedaços de código de várias linguagens de programaçãoGlobal
commentComentárioDesenvolvimentoPermite inserir comentários no fonte do conteúdo. Essa macro não exibe nada.Global
containerContainerDisposiçãoUma macro para englobar múltiplos grupos e adicionar elementos decorativos.Global
contentContentConteúdoAllows writing content in any wiki markupGlobal
contextContextoDesenvolvimentoExecuta um documento no contexto de outro documento informadoGlobal
dashboardPainel de ControleDisposiçãoUma macro para definir um painel principal a ser preenchido como outros painéis.Global
displayExibir PáginaConteúdoExibir outras páginas na página atual.Global
displayIconIconConteúdoDisplay an icon.Global
documentsDocumentosConteúdoMostra uma lista de documentos em uma tabela dinâmicaCurrent Wiki
documentTreePage TreeNavegaçãoDisplays the tree of XWiki pages.Current Wiki
errorMensagem de ErroFormataçãoMostar uma mensagem de erro.Global
exampleExampleFormataçãoShows an example and its source code.Current Wiki
footnoteRodapéConteúdoGera nota de rodapé para exibir no final da página.Global
galleryGaleriaDisposiçãoMostra as imagens encontradas em determinado conteúdo usando visualização de slides.Global
groovyGroovyDesenvolvimentoExecutar um script Groovy.Global
htmlHTMLDesenvolvimentoInsere código HTML ou XHTML na página.Global
iconPickerIcon PickerDesenvolvimentoSelect an icon within the XWiki icon set.Current Wiki
idIdNavegaçãoPermite colocar uma referência/localização numa página. Em HTML por exemplo isso é chamado âncora. Permite apontar para aquela localização em links por exemplo.Global
includeIncluir PáginaConteúdoInsere outras páginas na página atual.Global
infoMensagem de InformaçãoFormataçãoExibe uma mensagem de informação.Global
liveDataLive DataConteúdoDisplay dynamic lists of data.Global
mentionUser MentionNotificationsInsert a user mention.Current Wiki
menuMenuNavegaçãoExibe um menu criado usando sintaxe wiki simples (listas e links aninhados).Global
messageSenderEnvia MensagensSocialUm conttrole que permite aos usuários enviar mensagens que vão ser tratadas pelo módulo MessageStream.Current Wiki
notificationsNotificationsNotificationsDisplay notifications about events happened on the wiki.Current Wiki
notificationsApplicationsPreferencesNotifications Applications PreferencesNotificationsDisplay the preferences of the current user about notification applications.Current Wiki
notificationsAutoWatchPreferencesNotifications Auto Watch PreferencesNotificationsDisplay the preferences of the current user about auto watched pages.Current Wiki
notificationsCustomFiltersPreferencesNotifications Custom Filters PreferencesNotificationsDisplay the preferences of the given user about custom notification filters.Current Wiki
notificationsEmailPreferencesNotifications Email PreferencesNotificationsDisplay the preferences of the current user about notification emails.Current Wiki
notificationsFiltersPreferencesNotifications Filters Preferences (deprecated)NotificationsDisplay the preferences of the current user about notification filters.
This macro is now deprecated in favor of Custom Notifications Filters Preferences or System Notifications Filters Preferences.
Current Wiki
notificationsSystemFiltersPreferencesNotifications System Filters PreferencesNotificationsDisplay the preferences of the given user about system notification filters.Current Wiki
officevisualizador de Documentos OfficeConteúdoVisualiza documentos office anexos (doc, ppt, xls, odt, odp, ods etc.) nas páginas da wiki sem precisar baixar ou importar os documentos.Global
pdftocPDF Table of ContentsInternoGenerates the table of contents for the PDF export.Global
putFootnotesColoque notas de rodapéConteúdoExibe todas as notas de rodapé da página. Se estiverem ausentes, todas as notas de rodapé serão exibidas por padrão no final da página.Global
pythonPythonDesenvolvimentoExecutar um script Python.Global
scriptScriptDesenvolvimentoExecuta um script na linguagem informada.Global
spaceindexÍndice do EspaçoDescontinuadoLista os documentos em um espaço.Current Wiki
spacesEspaçosDescontinuadoMostra todos os espaços na wiki atual.Current Wiki
successMensagem de SucessoFormataçãoExibe uma mensagem de sucesso.Global
tagcloudNuvem de MarcadoresConteúdoMostrar nuvem de marcadores da wiki atual ou de um espaço informado, se os marcadores existirem.Current Wiki
templateTemplateDesenvolvimentoInsert a template.Global
tocÍndiceNavegaçãoGerar Índice no documento.Global
translationTranslationConteúdoDisplay a translation message.Global
treeTreeNavegaçãoDisplays a tree hierarchy defined by the macro content or the source parameter.Current Wiki
uiextensionUI ExtensionDesenvolvimentoInsert a UI extension.Global
uiextensionsUI ExtensionsDesenvolvimentoInsert UI extensions.Global
useravatarAvatar de UsuárioConteúdoPermite exibir o avatar de um determinado usuário.Global
velocityVelocityDesenvolvimentoExecuta um script Velocity.Global
warningMensagem de AvisoFormataçãoExibe uma mensagem de aviso.Global
wikimacrocontentWikiMacro ContentDesenvolvimentoDisplay editable content of a wikimacro.Global
wikimacroparameterWikiMacro ParameterDesenvolvimentoDisplay editable parameter of a wikimacro.Global
wikisWikisNavegaçãoListar todas as wikisCurrent Wiki
workspacesEspaços de trabalho (Legado)DescontinuadoMacro obsoleta que não deve ser usada aqui por motivos de compatibilidade. Em vez disso, use a macro "wikis".Current Wiki

HTML

2.0 HTML

In XWiki Syntax 2.1 HTML or XHTML must be entered by using the HTML macro.

XWiki Syntax 2.1Result
{{html}}<abbr title="HyperText Markup Language">HTML</abbr>{{/html}} HTML

Roteiros

2.0 Scripts

RecursoSintaxe do XWiki 2.1
Script Velocity
{{velocity}}
#set($var = "tanto faz")
{{/velocity}}
Script Groovy
{{groovy}}
def var = "tanto faz"
{{/groovy}}