Changes for page Configuration

Last modified by Thomas Mortagne on 2023/10/31

<
From version < 180.1 >
edited by Pascal Bastien
on 2017/09/15
To version < 181.1 >
edited by Vincent Massol
on 2017/09/26
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.pbas
1 +XWiki.VincentMassol
Content
... ... @@ -236,23 +236,20 @@
236 236  * **xwiki.db**: name of database schema for the main wiki (including the name of the wiki in a non-virtual environment, otherwise the database name comes from the hibernate configuration file).
237 237  * **xwiki.db.prefix**: useful mainly for [[virtual wikis>>Documentation.AdminGuide.Virtualization.WebHome]], where we have a separate database schema for each virtual wiki. This prefix is added to the database schema name after usual mapping between wiki names and schemas. Note that this is also applied to the main wiki database name.
238 238  
239 -= Turning off comments or attachments =
239 += Controlling Page Tabs =
240 240  
241 -You need to change the ##XWiki.XWikiPreferences## class like this:
241 +You can do this from the [[Administration>>extensions:Extension.Administration Application||anchor="HPresentation"]].
242 242  
243 -* Go to ##<server>/xwiki/bin/edit/XWiki/XWikiPreferences?editor=class##
244 -* Add a new property called ##showcomments## (or ##showattachments## for turning off attachments) of type String Class
245 -* Go to ##<server>/xwiki/bin/edit/XWiki/XWikiPreferences?editor=object&classname=XWiki.XWikiPreferences## and write no in the ##showcomments## (or ##showattachments##) field
243 +If you wish to turn on/off comments/annotations/attachments/history/information tabs only for a single page you just need to [[define some properties in a script in the page>>platform:DevGuide.Scripting#HControllingWhichSectionstoDisplay]].
246 246  
247 -That's it, the comments (or attachments) are gone. If you want to re-enable them, replace the "no" value with "yes".
248 -
249 -If you wish to turn off comments/attachments/history/information tabs only for a single page you just need to [[define some properties in a script in the page>>platform:DevGuide.Scripting#HControllingWhichSectionstoDisplay]].
250 -
251 251  Last, if you wish to turn them off based on some programmatic rule (such as display them only for Administrators), you should define the properties in the ##layoutExtraVars.vm## template file from your XWiki installation. For example:
252 252  
253 253  {{code language="none"}}
254 254  #if (!$hasAdmin)
255 - #set($docextras = [])
249 + ## Hide tabs
250 + #set($displayDocExtra = false)
251 + ## Hide viewer shortcuts in the menu
252 + #set ($displayShortcuts = false)
256 256  #end
257 257  {{/code}}
258 258  
... ... @@ -349,7 +349,7 @@
349 349  {{info}}
350 350  As mentioned the ##style## property stores CSS code. The field is parsed by the Velocity engine, so you can use the [[current color theme>>extensions:Extension.Color Theme Application#HUsingColorThemesvariables]] to style your PDF. Also, you can insert page break in PDF file with //page-break-before// CSS instruction. For example:
351 351  
352 -{{code language=css}}
349 +{{code language="css"}}
353 353  #template('colorThemeInit.vm')
354 354  h2 {
355 355   color: $theme.titleColor;

Get Connected