Actions générales :
Connexion
Inscription
Accueil ▼: Annuaire des Wikis
»
Espace: MenuCode
»
Page: MenuWikiMacro
en
Actions relatives à la page :
Exporter ▼: Exporter en PDF Exporter en RTF Exporter en HTML
Plus d'actions ▼: Prévisualisation Voir le code source
MenuWikiMacro

# Code source wiki de MenuWikiMacro

Modifié par Guenther Hutter le 2016/01/31 08:19
Masquer les numéros de lignes 1: {{velocity}} 2: #set($hql = ", BaseObject as obj WHERE doc.fullName = obj.name AND doc.fullName = 'XWiki.LeiothrixSkinConfig' AND obj.className = 'XWiki.LeiothrixSkinConfigClass'") 3: #foreach($item in $xwiki.searchDocuments($hql)) 4: #set($itemdoc = $xwiki.getDocument($item)) 5: #set($itemobj = $itemdoc.getObject('XWiki.LeiothrixSkinConfigClass')) 6: ## 7: ##Social buttonsconfiguration - START 8: ## 9: ###Display buttons bar 10: #set($socialButtons = $itemobj.getProperty('socialButtons').value) 11: ## 12: ###Display Facebook button 13: #set($facebookDisplay = $itemobj.getProperty('facebookDisplay').value) 14: #if($facebookDisplay == 1) 15: #set($facebookSocialButtons = $itemobj.getProperty('facebookLink').value) 16: #if("$!facebookSocialButtons" == '') 17: #set($facebookDisplay = 0) 18: #end 19: #end 20: ## 21: ###Display Twitter button 22: #set($twitterDisplay = $itemobj.getProperty('twitterDisplay').value) 23: #if($twitterDisplay == 1) 24: #set($twitterSocialButtons = $itemobj.getProperty('twitterLink').value) 25: #if("$!twitterSocialButtons" == '') 26: #set($twitterDisplay = 0) 27: #end 28: #end 29: ## 30: ###Display Google+ button 31: #set($googleDisplay = $itemobj.getProperty('googleDisplay').value) 32: #if($googleDisplay == 1) 33: #set($googleSocialButtons = $itemobj.getProperty('googleLink').value) 34: #if("$!googleSocialButtons" == '') 35: #set($googleDisplay = 0) 36: #end 37: #end 38: ## 39: ##Social buttonsconfiguration - END 40: ## 41: #end 42: 43: {{html clean=false}}<div id="mainMenuContainer">{{/html}} 44: 45: {{menu type="horizontal" position="left" id="mainMenu"}} 46: $xwiki.renderText($itemobj.getProperty('menuConfig').value, $doc) 47: #foreach($menuItem in $menuList) 48: #set($menuURL = $services.model.serialize($services.model.createDocumentReference($xcontext.database, $menuItem[0], $menuItem[1]))) 49: * [[$msg.get("PublicSite.menu_${menuItem[2]}")>>$menuURL||class="mainMenu${escapetool.xml($menuItem[0].replaceAll(' ', '_'))}"]] 50: #end 51: 52: #if($socialButtons == 1) 53: (%class="mainMenuSocial"%) 54: #if($facebookDisplay == 1) 55: * [[image:MenuCode.MenuWikiMacro@facebook.png>>$facebookSocialButtons||rel="_blank"]] 56: #end 57: #if($twitterDisplay == 1) 58: * [[image:MenuCode.MenuWikiMacro@twitter.png>>$twitterSocialButtons ||rel="_blank"]] 59: #end 60: #if($googleDisplay == 1) 61: * [[image:MenuCode.MenuWikiMacro@google.png>>$googleSocialButtons||rel="_blank"]] 62: #end 63: #end 64: {{/menu}} 65: 66: {{html clean=false}}</div>{{/html}} 67: {{/velocity}}

(c) 2026, by bytebang e.U. - Impressum - Datenschutz / Nutzungsbedingungen
-