1 # <a name="TWiki._PatternSkin Customization"></a><a name=" TWiki._PatternSkin Customizatio"></a> [[PatternSkin]] Customization
3 **Questions and answers on configuring page elements.** For styling your TWiki, see [[PatternSkinCssCookbook]].
7 <li><a href="#Logo questions"> Logo questions</a><ul>
8 <li><a href="#How can I change the web logo?"> How can I change the web logo?</a></li>
9 <li><a href="#How do I set a site-wide logo?"> How do I set a site-wide logo?</a></li>
10 <li><a href="#My logo does not fit the top bar"> My logo does not fit the top bar</a></li>
11 <li><a href="#I want to change the white space"> I want to change the white space above and below the logo</a></li>
14 <li><a href="#Top bar questions"> Top bar questions</a><ul>
15 <li><a href="#I want to set or change the top"> I want to set or change the top background image</a></li>
16 <li><a href="#I want to have the web color in"> I want to have the web color in the top bar</a></li>
17 <li><a href="#I want to remove the Jump and Se"> I want to remove the Jump and Search boxes from the top bar </a></li>
18 <li><a href="#I want to hide the top bar"> I want to hide the top bar</a></li>
21 <li><a href="#Left bar questions"> Left bar questions</a><ul>
22 <li><a href="#I want to hide the left bar"> I want to hide the left bar</a></li>
25 <li><a href="#Other page parts"> Other page parts</a><ul>
26 <li><a href="#I want to hide the edit buttons"> I want to hide the edit buttons from certain users</a></li>
32 ## <a name="Logo questions"></a> Logo questions
34 ### <a name="How can I change the web logo?"></a> How can I change the web logo?
36 By default the logo at the top left of each web points to the image with name `logo.gif` that is attached to each web's [[WebPreferences]]. <br /> The default variables that cause this behavior are defined in [[TWikiPreferences]].
38 Redefine your custom variables in [[Main.TWikiPreferences|Main/TWikiPreferences]] (to keep [[TWikiPreferences]] intact):
40 * Set WEBLOGONAME = logo.gif
41 * Set WEBLOGOIMG = %PUBURLPATH%/%BASEWEB%/%WEBPREFSTOPIC%/%WEBLOGONAME%
42 * Set WEBLOGOURL = %SCRIPTURLPATH{"view"}%/%BASEWEB%/%HOMETOPIC%
43 * Set WEBLOGOALT = Home
45 There are 2 ways to change the logo in a web:
49 > - Create a new image named `logo.gif` and attach it to the web's [[WebPreferences]] topic. [[PatternSkin]]'s stylesheet assumes the logo is 40px high. More about that later.
50 > - You can also upload the image with FTP to `/pub/YourWeb/WebPreferences/`.
52 **Using a new filename:**
54 > - Attach whatever image and attach it to the web's [[WebPreferences]] topic. Then add to the [[WebPreferences]] (under _Custom web preferences_):
56 > * Set WEBLOGONAME = your-logo-name.gif-or-png
58 ### <a name="How do I set a site-wide logo?"></a> How do I set a site-wide logo?
60 There is a bunch of site-wide logo variables in [[Main.TWikiPreferences|Main/TWikiPreferences]]: `WIKILOGOIMG`, `WIKILOGOURL` and `WIKILOGOALT`. To change only the web logo image to site-wide, in [[Main.TWikiPreferences|Main/TWikiPreferences]] set:
62 * Set WEBLOGOIMG = %WIKILOGOIMG%
64 ### <a name="My logo does not fit the top bar"></a> My logo does not fit the top bar
66 The top bar is 64 pixels high by default.
70 > Change the height of the top bar in
72 > `templates/viewtopbar.pattern.tmpl`
76 > %TMPL:DEF{"topbardimensions"}%
78 > #patternClearHeaderCenter,
79 > #patternClearHeaderLeft,
80 > #patternClearHeaderRight,
81 > #patternTopBarContentsOuter {
82 > height:64px; /* top bar height; make room for header columns */
87 > Only change the number.
89 **Using style sheets:**
91 > Create a new stylesheet with above definition in it, attach it to a topic and point
95 > to that topic attachment. See
97 > [[PatternSkinCssCookbook]]
99 > about creating custom styles.
101 ### <a name="I want to change the white space"></a> I want to change the white space above and below the logo
103 Change the table style in [[WebTopBar]]. Default top padding is 11px.
105 ## <a name="Top bar questions"></a> Top bar questions
107 ### <a name="I want to set or change the top"></a><a name="I want to set or change the top "></a> I want to set or change the top background image
109 The image at the top is called "header art" - commonly the top image found on blog sites. The image that is displayed by default is set by the variable `WEBHEADERART`, defined in [[TWikiPreferences]].
111 Redefine your custom variables in [[Main.TWikiPreferences|Main/TWikiPreferences]] (to keep [[TWikiPreferences]] intact):
113 * Set WEBHEADERART = %PUBURLPATH%/%TWIKIWEB%/PatternSkin/TWiki_header.gif
114 * Set WEBHEADERBGCOLOR = somehexcolor (no quotes, for example: #ffffff)
116 You can also set `WEBHEADERART` per web, by defining the variable in the Web's WebPreferences.
118 ### <a name="I want to have the web color in"></a><a name="I want to have the web color in "></a> I want to have the web color in the top bar
120 Redefine `WEBHEADERBGCOLOR` in [[Main.TWikiPreferences|Main/TWikiPreferences]] (to keep [[TWikiPreferences]] intact):
122 * Set WEBHEADERBGCOLOR = %WEBBGCOLOR%
124 ### <a name="I want to remove the Jump and Se"></a> I want to remove the Jump and Search boxes from the top bar
126 If you have localization enabled, you will also see a language dropdown box at the far right.
128 You can remove these items from [[WebTopBar]].
130 ### <a name="I want to hide the top bar"></a> I want to hide the top bar
134 > The view template is populated like this:
136 > %TMPL:INCLUDE{"page"}%
137 > %TMPL:INCLUDE{"viewtopbar"}%
138 > %TMPL:INCLUDE{"viewtoolbar"}%
139 > %TMPL:INCLUDE{"viewleftbar"}%
140 > %TMPL:INCLUDE{"viewrightbar"}%
141 > %TMPL:INCLUDE{"viewtopicactionbuttons"}%
142 > %TMPL:INCLUDE{"viewbottombar"}%
144 > Each included template draws a part of the screen. Omit
146 > `%TMPL:INCLUDE{"viewtopbar"}%`
148 > to hide the top bar, or in a view template clear it using
150 > `%TMPL:INCLUDE{"viewtopbar"}%%TMPL:END%`
152 **Using style sheets:**
156 > [[PatternSkinCssCookbookNoTopBar]]
160 ## <a name="Left bar questions"></a> Left bar questions
162 ### <a name="I want to hide the left bar"></a> I want to hide the left bar
168 > `%TMPL:INCLUDE{"viewleftbar"}%`
170 > to hide the left bar, or in a view template clear it using
172 > `%TMPL:INCLUDE{"viewleftbar"}%%TMPL:END%`
174 **Using style sheets:**
178 > [[PatternSkinCssCookbookNoLeftBar]]
182 ## <a name="Other page parts"></a> Other page parts
184 ### <a name="I want to hide the edit buttons"></a><a name="I want to hide the edit buttons "></a> I want to hide the edit buttons from certain users
186 It may defy the wiki-ness of your TWiki installation, but in certain circumstances it could be useful to hide the edit buttons from users that are not logged in, for instance for customers.
188 Create in the template directory the file `view.customer.tmpl`. 'Empty' `topicaction` and `toolbar` by writing in the template:
190 %TMPL:INCLUDE{"view.pattern"}%
191 %TMPL:DEF{"topicaction"}%%TMPL:END%
192 %TMPL:DEF{"toolbar"}%%TMPL:END%
194 In [[TWikiGuest]], set the cover to
196 * Set COVER = customer
198 By default this topic is editable only by TWikiAdminGroup members.