r6 - 16 Jan 2007 - 04:12 - Main.TWikiContributor | r5 - 01 Apr 2006 - 05:55 - Main.TWikiContributor | ||||
---|---|---|---|---|---|
PatternSkin Customization |
PatternSkin Customization |
||||
Questions and answers on configuring page elements. For styling your TWiki, see PatternSkinCssCookbook. |
Questions and answers on configuring page elements. For styling your TWiki, see PatternSkinCssCookbook. |
||||
First Read: How to modify PatternSkin templates |
Logo questions |
||||
If you need to change any of the elements that are visible on the common 'view' pages, you need to change the 'view' template: |
|||||
Example |
|||||
The steps you would need: |
|||||
|
|||||
* Set COVER = myskinor write* Set SKIN = myskin,pattern |
|||||
Logo |
|||||
How can I change the web logo? |
How can I change the web logo? |
||||
By default the logo at the top left of each web points to the image with name |
By default the logo at the top left of each web points to the image with name |
||||
Redefine your custom variables in Main.TWikiPreferences (to keep TWikiPreferences intact): |
Redefine your custom variables in Main.TWikiPreferences (to keep TWikiPreferences intact): |
||||
* Set WEBLOGONAME = logo.gif * Set WEBLOGOIMG = %PUBURLPATH%/%BASEWEB%/%WEBPREFSTOPIC%/%WEBLOGONAME% * Set WEBLOGOURL = %SCRIPTURLPATH{"view"}%/%BASEWEB%/%HOMETOPIC% * Set WEBLOGOALT = Home |
* Set WEBLOGONAME = logo.gif * Set WEBLOGOIMG = %PUBURLPATH%/%BASEWEB%/%WEBPREFSTOPIC%/%WEBLOGONAME% * Set WEBLOGOURL = %SCRIPTURLPATH{"view"}%/%BASEWEB%/%HOMETOPIC% * Set WEBLOGOALT = Home |
||||
There are 2 ways to change the logo in a web: |
There are 2 ways to change the logo in a web: |
||||
Using logo.gif: |
Using logo.gif: |
||||
|
|
||||
Using a new filename: |
Using a new filename: |
||||
|
|
||||
How do I set a site-wide logo? |
How do I set a site-wide logo? |
||||
There is a bunch of site-wide logo variables in Main.TWikiPreferences: |
There is a bunch of site-wide logo variables in Main.TWikiPreferences: |
||||
* Set WEBLOGOIMG = %WIKILOGOIMG% |
* Set WEBLOGOIMG = %WIKILOGOIMG% |
||||
My logo does not fit the top bar |
My logo does not fit the top bar |
||||
The top bar is 64 pixels high by default. |
The top bar is 64 pixels high by default. |
||||
Using templates: |
Using templates: |
||||
Change the height of the top bar in |
Change the height of the top bar in |
||||
Using style sheets: |
Using style sheets: |
||||
Create a new stylesheet with above definition in it, attach it to a topic and point |
Create a new stylesheet with above definition in it, attach it to a topic and point |
||||
I want to change the white space above and below the logo |
I want to change the white space above and below the logo |
||||
Change the table style in topic WebTopBar. The default top padding is 11px. |
Change the table style in WebTopBar. Default top padding is 11px. |
||||
Top bar |
Top bar questions |
||||
I want to set or change the top background image |
I want to set or change the top background image |
||||
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 |
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 |
||||
Redefine your custom variables in Main.TWikiPreferences (to keep TWikiPreferences intact): |
Redefine your custom variables in Main.TWikiPreferences (to keep TWikiPreferences intact): |
||||
* Set WEBHEADERART = %PUBURLPATH%/%TWIKIWEB%/PatternSkin/TWiki_header.gif * Set WEBHEADERBGCOLOR = somehexcolor (no quotes, for example: #ffffff) |
* Set WEBHEADERART = %PUBURLPATH%/%TWIKIWEB%/PatternSkin/TWiki_header.gif * Set WEBHEADERBGCOLOR = somehexcolor (no quotes, for example: #ffffff) |
||||
You can also set |
You can also set |
||||
I want to have the web color in the top bar |
I want to have the web color in the top bar |
||||
Redefine |
Redefine |
||||
* Set WEBHEADERBGCOLOR = %WEBBGCOLOR% |
* Set WEBHEADERBGCOLOR = %WEBBGCOLOR% |
||||
I want to remove the Jump and Search boxes from the top bar |
I want to remove the Jump and Search boxes from the top bar |
||||
If you have localization enabled, you will also see a language dropdown box at the far right. |
If you have localization enabled, you will also see a language dropdown box at the far right. |
||||
You can remove these items from WebTopBar. |
You can remove these items from WebTopBar. |
||||
I want to hide the top bar |
I want to hide the top bar |
||||
Using templates: |
Using templates: |
||||
The view template is populated with page elements using template inclusions: |
The view template is populated like this:%TMPL:INCLUDE{"page"}% %TMPL:INCLUDE{"viewtopbar"}% %TMPL:INCLUDE{"viewtoolbar"}% %TMPL:INCLUDE{"viewleftbar"}% %TMPL:INCLUDE{"viewrightbar"}% %TMPL:INCLUDE{"viewtopicactionbuttons"}% %TMPL:INCLUDE{"viewbottombar"}%Each included template draws a part of the screen. Omit |
||||
%TMPL:INCLUDE{"page"}% %TMPL:INCLUDE{"viewtopbar"}% %TMPL:INCLUDE{"viewtoolbar"}% %TMPL:INCLUDE{"viewleftbar"}% %TMPL:INCLUDE{"viewrightbar"}% %TMPL:INCLUDE{"viewtopicactionbuttons"}% %TMPL:INCLUDE{"viewbottombar"}% |
|||||
Each included template draws a part of the screen. |
|||||
Another approach is to clear the contents of module |
|||||
%TMPL:INCLUDE{"view"}% %TMPL:INCLUDE{"topbar"}%%TMPL:END% |
|||||
Using style sheets: |
Using style sheets: |
||||
See PatternSkinCssCookbookNoTopBar. |
See PatternSkinCssCookbookNoTopBar. |
||||
Left bar |
Left bar questions |
||||
I want to hide the left bar |
I want to hide the left bar |
||||
Using templates: |
Using templates: |
||||
Omit |
Omit |
||||
Using style sheets: |
Using style sheets: |
||||
See PatternSkinCssCookbookNoLeftBar. |
See PatternSkinCssCookbookNoLeftBar. |
||||
Other page parts |
Other page parts |
||||
I want to hide the edit buttons from certain users |
I want to hide the edit buttons from certain users |
||||
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. |
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. |
||||
Create in the template directory the file |
Create in the template directory the file |
||||
%TMPL:INCLUDE{"view"}% %TMPL:DEF{"topicaction"}%%TMPL:END% %TMPL:DEF{"toolbar"}%%TMPL:END% |
%TMPL:INCLUDE{"view.pattern"}% %TMPL:DEF{"topicaction"}%%TMPL:END% %TMPL:DEF{"toolbar"}%%TMPL:END% |
||||
In TWikiGuest, set the cover to |
In TWikiGuest, set the cover to |
||||
* Set COVER = customer |
* Set COVER = customer |
||||
By default this topic is editable only by TWikiAdminGroup members. |
By default this topic is editable only by TWikiAdminGroup members. |
||||
I want to remove the History button from the bottom |
|||||
All action buttons are defined in |
|||||
|
|||||
In your |
|||||
%TMPL:INCLUDE{"view"}% %TMPL:DEF{"topicactionbuttons"}% | %TMPL:P{context="WysiwygPluginEnabled" then="activatable_edit_wysiwyg"}% | %TMPL:P{"activatable_attach"}% | %TMPL:P{"printable"}% | %TMPL:P{"raw"}% | %TMPL:P{"backlinks"}% | %TMPL:P{"activatable_more"}%%TMPL:END% |
|||||
Test by appending |
|||||
I want to insert text outside of the topic content |
|||||
PatternSkin has 2 'buckets' to write additional content to: |
|||||
Both modules are wrapped in CSS containers: |
|||||
|
|||||
To put contents before the main text, use the custom skin approach as described above. |
|||||
%TMPL:INCLUDE{"view"}% %TMPL:DEF{"beforetextcontents"}%This is the text before%TMPL:END% |
|||||
Test by appending |
|||||
Use the same procedure for contents to be put after the topic text: |
|||||
%TMPL:INCLUDE{"view"}% %TMPL:DEF{"aftertextcontents"}%This is the text after%TMPL:END% |
|||||
r6 - 16 Jan 2007 - 04:12 - TWikiContributor | r5 - 01 Apr 2006 - 05:55 - TWikiContributor | ||||
Topic PatternSkinCustomization . { View | History | Interweave | r6 < r5 < r4 < r3 < r2 | More } |
Revision r6 - 16 Jan 2007 - 04:12 - TWikiContributor Revision r5 - 01 Apr 2006 - 05:55 - TWikiContributor |
This site is powered by the TWiki collaboration platform.
All material on this collaboration platform is the property of the contributing authors. All material marked as authored by Eben Moglen is available under the license terms CC-BY-SA version 4. |