Toggle navigation
Log-in
Home
Page Index
User Index
Application Index
Global
Wiki Index
Help
Templates
Wiki source code of
Templates
Last modified by eaminov on 2017/06/14 01:05
Show line numbers
{{include reference="Help.Code.VelocityMacros" /}} {{velocity output="false"}} #set ($actionCards = [{ 'title': 'Use templates', 'description': 'Templates are predefined pages that can be copied when creating a new page.', 'tip': "<a href=""http://platform.xwiki.org/xwiki/bin/view/Features/DocumentLifecycle#HCreate"" class=""wikiexternallink"">Creating pages</a> based on templates makes it faster to adapt predefined content to your needs.", 'thumbnail': 'Template', 'actions': [{ 'label': 'Try it!', 'type': 'success', 'url': $xwiki.getURL('Sandbox.WebHome', 'create', $escapetool.url({ 'title': "New Page $datetool.get('dd MMM yyyy, HH:mm')" })) }] }, { 'title': 'Create your template', 'description': 'Integrate structure and macros in an existing page, and transform it in a template.', 'tip': "<a href=""http://extensions.xwiki.org/xwiki/bin/view/Extension/Administration+Application#HCreatetheTemplateProvider"" class=""wikiexternallink"">Template Providers</a> expose templates on the Create Page dialog so that the users can use them.", 'thumbnail': 'Administration', 'actions': [{ 'label': 'Learn more', 'url': 'http://extensions.xwiki.org/xwiki/bin/view/Extension/Administration+Application#HCreatetheTemplateProvider' }] }]) #if ($hasAdmin) #set ($discard = $actionCards[1].actions.add(0, { 'label': 'Browse', 'url': $xwiki.getURL('XWiki.XWikiPreferences', 'admin', 'editor=globaladmin§ion=Templates') })) #end #set ($exampleCards = [{ 'title': 'Article', 'description': 'Article page', 'examples': 'Help.Templates.Article.WebHome', 'thumbnail': 'Help.Templates.Article.WebHome@article.png' }, { 'title': 'Encyclopedia', 'description': 'Encyclopedia page', 'examples': 'Help.Templates.Encyclopedia.WebHome', 'thumbnail': 'Help.Templates.Encyclopedia.WebHome@encyclopedia.png' }, { 'title': 'Meeting Report', 'description': 'Agenda and notes', 'examples': 'Help.Templates.Meeting.WebHome', 'thumbnail': 'Help.Templates.Meeting.WebHome@meeting.png' }, { 'title': 'Simple Page', 'description': 'With table of contents', 'examples': 'Help.Templates.Simple.WebHome', 'thumbnail': 'Help.Templates.Simple.WebHome@simple.png' }]) {{/velocity}} {{velocity}} {{html clean="false"}} <div class="row"> #foreach ($card in $actionCards) ## See http://getbootstrap.com/css/#grid-responsive-resets . #if ($foreach.index > 0 && $foreach.index % 2 == 0) <div class="clearfix visible-sm-block visible-md-block visible-lg-block"></div> #end <div class="col-xs-12 col-sm-6"> #helpActionCard($card) </div> #end </div> <h3 id="HExamples">Examples</h3> <p>Want to start from a predefined template? Here are some examples of available templates inside XWiki.</p> <div class="row"> #foreach ($card in $exampleCards) ## See http://getbootstrap.com/css/#grid-responsive-resets . #if ($foreach.index > 0 && $foreach.index % 2 == 0) <div class="clearfix visible-sm-block "></div> #end #if ($foreach.index > 0 && $foreach.index % 3 == 0) <div class="clearfix visible-md-block"></div> #end #if ($foreach.index > 0 && $foreach.index % 4 == 0) <div class="clearfix visible-lg-block"></div> #end <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3"> #helpExampleCard($card) </div> #end </div> <p><a href="http://extensions.xwiki.org/xwiki/bin/view/Extension/Templates+Application/" class="wikiexternallink">View more templates</a></p> {{/html}} {{/velocity}}