Wiki source code of Macros
Last modified by Drunk Monkey on 2025-03-18 08:50
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | {{include reference="Help.Code.VelocityMacros" /}} |
2 | |||
3 | {{velocity output="false"}} | ||
4 | #if ($hasAdmin) | ||
5 | #set ($section = 'XWiki.Extensions') | ||
6 | #if (!$xwiki.exists($section)) | ||
7 | ## Support for pre-9.2RC1 Administration Application | ||
8 | #set ($section = 'XWiki.AddExtensions') | ||
9 | #end | ||
10 | #set ($browseMacrosURL = $xwiki.getURL('XWiki.XWikiPreferences', 'admin', "section=${section}&search=macro&repo=")) | ||
11 | #else | ||
![]() |
2.1 | 12 | #set ($browseMacrosURL = 'https://extensions.xwiki.org/xwiki/bin/view/Extension/#%7Ct=extensions&p=1&l=30&s=doc.creationDate&d=desc&category=macro') |
![]() |
1.1 | 13 | #end |
14 | |||
15 | #set ($actionCards = [{ | ||
16 | 'title': $services.localization.render('help.macros.useMacros.title'), | ||
17 | 'description': $services.localization.render('help.macros.useMacros.description'), | ||
![]() |
2.1 | 18 | 'tip':$services.localization.render('help.macros.useMacros.tip', ["<a href='https://extensions.xwiki.org/xwiki/bin/view/Extension/CKEditor+Integration' class='wikiexternallink'>",'</a>', $services.icon.renderHTML('cog')]), |
![]() |
1.1 | 19 | 'thumbnail': 'Macro', |
20 | 'actions': [{ | ||
21 | 'label': $services.localization.render('help.try.label'), | ||
22 | 'type': 'success', | ||
23 | 'url': $xwiki.getURL('Sandbox.TestPage1', 'edit', 'editor=wysiwyg') | ||
24 | }] | ||
25 | }, { | ||
26 | 'title': $services.localization.render('help.macros.browseMacros.title'), | ||
27 | 'description': $services.localization.render('help.macros.browseMacros.description'), | ||
28 | 'tip': $services.localization.render('help.macros.browseMacros.tip', ["<a href='#if($xwiki.exists('XWiki.XWikiSyntaxMacrosList'))$xwiki.getURL('XWiki.XWikiSyntaxMacrosList')#{else}$xwiki.getURL('XWiki.WikiMacros')#end'>",'</a>']), | ||
29 | 'thumbnail': 'EM', | ||
30 | 'actions': [{ | ||
31 | 'label': $services.localization.render('help.browse.label'), | ||
32 | 'url': $browseMacrosURL | ||
33 | }, { | ||
34 | 'label': $services.localization.render('help.more.label'), | ||
![]() |
3.1 | 35 | 'url': 'https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/WritingMacros/WikiMacroTutorial/' |
![]() |
1.1 | 36 | }] |
37 | }]) | ||
38 | |||
39 | #set ($exampleCards = [{ | ||
40 | 'title': $services.localization.render('help.macros.box.title'), | ||
41 | 'description': $services.localization.render('help.macros.box.description'), | ||
![]() |
2.1 | 42 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/Box+Macro', |
![]() |
1.1 | 43 | 'examples': 'Help.Macros.Box.WebHome', |
44 | 'thumbnail': 'Help.Macros.Box.WebHome@box.png' | ||
45 | }, { | ||
46 | 'title': $services.localization.render('help.macros.toc.title'), | ||
47 | 'description': $services.localization.render('help.macros.toc.description'), | ||
![]() |
2.1 | 48 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/TOC+Macro', |
![]() |
1.1 | 49 | 'examples': 'Help.Macros.ToC.WebHome', |
50 | 'thumbnail': 'Help.Macros.ToC.WebHome@toc.png' | ||
51 | }, { | ||
52 | 'title': $services.localization.render('help.macros.gallery.title'), | ||
53 | 'description': $services.localization.render('help.macros.gallery.description'), | ||
![]() |
2.1 | 54 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/Gallery+Macro', |
![]() |
1.1 | 55 | 'examples': 'Help.Macros.Gallery.WebHome', |
56 | 'thumbnail': 'Help.Macros.Gallery.WebHome@gallery.png' | ||
57 | }, { | ||
58 | 'title': $services.localization.render('help.macros.chart.title') , | ||
59 | 'description': $services.localization.render('help.macros.chart.description'), | ||
![]() |
2.1 | 60 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/Chart+Macro', |
![]() |
1.1 | 61 | 'examples': 'Help.Macros.Chart.WebHome', |
62 | 'thumbnail': 'Help.Macros.Chart.WebHome@chart.png' | ||
63 | }, { | ||
64 | 'title': $services.localization.render('help.macros.tree.title') , | ||
65 | 'description': $services.localization.render('help.macros.tree.description'), | ||
![]() |
2.1 | 66 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/Document+Tree+Macro', |
![]() |
1.1 | 67 | 'examples': 'Help.Macros.Tree.WebHome', |
68 | 'thumbnail': 'Help.Macros.Tree.WebHome@tree.png' | ||
69 | }, { | ||
70 | 'title': $services.localization.render('help.macros.notifications.title') , | ||
71 | 'description': $services.localization.render('help.macros.notifications.description'), | ||
![]() |
2.1 | 72 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/Notifications%20Application/#HNotificationsMacro', |
![]() |
1.1 | 73 | 'examples': 'Help.Macros.Notifications.WebHome', |
74 | 'thumbnail': 'Help.Macros.Notifications.WebHome@notifications.png' | ||
75 | }]) | ||
76 | {{/velocity}} | ||
77 | |||
78 | {{velocity}} | ||
79 | {{html clean="false"}} | ||
![]() |
4.1 | 80 | <ul class="card-list two-cols"> |
![]() |
1.1 | 81 | #foreach ($card in $actionCards) |
![]() |
4.1 | 82 | <li class="card"> |
![]() |
1.1 | 83 | #helpActionCard($card) |
![]() |
4.1 | 84 | </li> |
![]() |
1.1 | 85 | #end |
![]() |
4.1 | 86 | </ul> |
![]() |
1.1 | 87 | <h3 id="HExamples">Examples</h3> |
88 | <p>Need help or confused with some of our macros? Check out their documentation and find out more about their functionality.</p> | ||
![]() |
4.1 | 89 | <ul class="card-list three-cols"> |
![]() |
1.1 | 90 | #foreach ($card in $exampleCards) |
![]() |
4.1 | 91 | <li class="card"> |
![]() |
1.1 | 92 | #helpExampleCard($card) |
![]() |
4.1 | 93 | </li> |
![]() |
1.1 | 94 | #end |
![]() |
4.1 | 95 | </ul> |
![]() |
2.1 | 96 | <p><a href="https://extensions.xwiki.org/xwiki/bin/view/Main/#%7Ct=extensions&p=1&l=30&s=doc.creationDate&d=desc&category=macro" class="wikiexternallink">$services.localization.render('help.macros.more')</a></p> |
![]() |
1.1 | 97 | {{/html}} |
98 | {{/velocity}} |