{{velocity}} #set($glossaryHome = $doc.getObject("Glossary.GlossaryClass")) #if($glossaryHome) ## Don't display doc extra tabs for Glossary home pages #set($docextras=[]) $doc.use("Glossary.GlossaryClass") ## The space where to add and search for Glossary Entries #set ($glossarySpace = $doc.space) ## If this page is called with createGlossary=true then create a new page using the GlossaryTemplate template #if ($request.createGlossary == 'true') ## Remove the "?" if it's the last character since the Glossary sheet adds one automatically #set ($glossaryItem = $stringtool.stripEnd($stringtool.trim($!{request.glossaryItem}), '?')) ## If there's no glossaryItem then issue a warning below #if (!$stringtool.isBlank($glossaryItem)) #set ($newGlossaryReference = $services.model.createDocumentReference('', '', "$glossaryItem")) $response.sendRedirect($xwiki.getURL($newGlossaryReference, 'inline', "$!{request.queryString}&title=${escapetool.url($glossaryItem)}")) #end #end ##Adding 'Add Glossary' button on the main page ((( {{html wiki = "true"}} #if ($isGuest) #set($login = ${escapetool.xml($doc.getURL("login", "xredirect=$doc.externalURL"))}) #set($register = ${escapetool.xml($xwiki.getURL($services.model.resolveDocument('', 'default'), "register", "xredirect=$doc.externalURL"))}) $services.localization.render('platform.glossary.need', ["","","",""]) #else
#end {{/html}} ))) #end {{/velocity}}