Wiki-Quellcode von Makros
Zuletzt geändert von kalcom Support am 2025/04/23 11:51
Zeige letzte Bearbeiter
| author | version | line-number | content |
|---|---|---|---|
| 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 | ||
| 12 | #set ($browseMacrosURL = 'https://extensions.xwiki.org/xwiki/bin/view/Extension/#%7Ct=extensions&p=1&l=30&s=doc.creationDate&d=desc&category=macro') | ||
| 13 | #end | ||
| 14 | |||
| 15 | #set ($actionCards = [{ | ||
| 16 | 'title': $services.localization.render('help.macros.useMacros.title'), | ||
| 17 | 'description': $services.localization.render('help.macros.useMacros.description'), | ||
| 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')]), | ||
| 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'), | ||
| 35 | 'url': 'https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/WritingMacros/WikiMacroTutorial/' | ||
| 36 | }] | ||
| 37 | }]) | ||
| 38 | |||
| 39 | #set ($exampleCards = [{ | ||
| 40 | 'title': $services.localization.render('help.macros.box.title'), | ||
| 41 | 'description': $services.localization.render('help.macros.box.description'), | ||
| 42 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/Box+Macro', | ||
| 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'), | ||
| 48 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/TOC+Macro', | ||
| 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'), | ||
| 54 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/Gallery+Macro', | ||
| 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'), | ||
| 60 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/Chart+Macro', | ||
| 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'), | ||
| 66 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/Document+Tree+Macro', | ||
| 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'), | ||
| 72 | 'documentation': 'https://extensions.xwiki.org/xwiki/bin/view/Extension/Notifications%20Application/#HNotificationsMacro', | ||
| 73 | 'examples': 'Help.Macros.Notifications.WebHome', | ||
| 74 | 'thumbnail': 'Help.Macros.Notifications.WebHome@notifications.png' | ||
| 75 | }]) | ||
| 76 | {{/velocity}} | ||
| 77 | |||
| 78 | {{velocity}} | ||
| 79 | {{html clean="false"}} | ||
| 80 | <ul class="card-list two-cols"> | ||
| 81 | #foreach ($card in $actionCards) | ||
| 82 | <li class="card"> | ||
| 83 | #helpActionCard($card) | ||
| 84 | </li> | ||
| 85 | #end | ||
| 86 | </ul> | ||
| 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> | ||
| 89 | <ul class="card-list three-cols"> | ||
| 90 | #foreach ($card in $exampleCards) | ||
| 91 | <li class="card"> | ||
| 92 | #helpExampleCard($card) | ||
| 93 | </li> | ||
| 94 | #end | ||
| 95 | </ul> | ||
| 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> | ||
| 97 | {{/html}} | ||
| 98 | {{/velocity}} |