/templates/view.pattern.tmpl
. The quickest way would be to simply change the text in the template. A safer way - strongly recommended, because it will survive a TWiki update - is to create your own custom skin. That may sound like an awful lot of work, but in reality a skin may be as much as 1 file that consists of only a few lines of code.
Example %TMPL:DEF{"topicactionbuttons"}%
, which is located in view.pattern.tmpl
.
The steps you would need: myskin
for now.
/templates
called view.myskin.tmpl
.
view.myskin.tmpl
you write: %TMPL:INCLUDE{"view"}%
%TMPL:DEF{"topicactionbuttons"}%%TMPL:P{"activatable_more"}%%TMPL:END%
?cover=myskin
. You should see an effect now.
* Set COVER = myskinor write* Set SKIN = myskin,pattern
logo.gif
that is attached to each web's WebPreferences. There are 2 ways to change the logo in a web: Using logo.gif:* Set WEBLOGONAME = logo.gif * Set WEBLOGOIMG = %PUBURLPATH%/%BASEWEB%/%WEBPREFSTOPIC%/%WEBLOGONAME% * Set WEBLOGOURL = %SCRIPTURLPATH{"view"}%/%BASEWEB%/%HOMETOPIC% * Set WEBLOGOALT = Home
Using a new filename:
- 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.- You can also upload the image with FTP to
/pub/YourWeb/WebPreferences/
.- Copy the above instructions ("Redefine your custom variables") and insert your logo name.
- Attach whatever image and attach it to the web's WebPreferences topic. Then add to the WebPreferences (under Custom web preferences):
* Set WEBLOGONAME = your-logo-name.gif-or-png
- Copy the above instructions ("Redefine your custom variables") and insert your logo name.
WIKILOGOIMG
, WIKILOGOURL
and WIKILOGOALT
.
To change only the web logo image to site-wide, in Main.TWikiPreferences set:
* Set WEBLOGOIMG = %WIKILOGOIMG%
Change the height of the top bar inUsing style sheets:templates/viewtopbar.pattern.tmpl
:%TMPL:DEF{"topbardimensions"}% #patternTopBar, #patternClearHeaderCenter, #patternClearHeaderLeft, #patternClearHeaderRight, #patternTopBarContentsOuter { height:64px; /* top bar height; make room for header columns */ overflow:hidden; } %TMPL:END%Only change the number from 64px to another value.
Create a new stylesheet with above definition in it, attach it to a topic and point USERLAYOUTURL
to that topic attachment. See PatternSkinCssCookbook about creating custom styles.
WEBHEADERART
, defined in TWikiPreferences.
Redefine your custom variables in Main.TWikiPreferences (to keep TWikiPreferences intact):
You can also set* Set WEBHEADERART = %PUBURLPATH%/%TWIKIWEB%/PatternSkin/TWiki_header.gif * Set WEBHEADERBGCOLOR = somehexcolor (no quotes, for example: #ffffff)
WEBHEADERART
per web, by defining the variable in the Web's WebPreferences.
WEBHEADERBGCOLOR
in Main.TWikiPreferences (to keep TWikiPreferences intact):
* Set WEBHEADERBGCOLOR = %WEBBGCOLOR%
%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.
%TMPL:INCLUDE{"viewtopbar"}%
to hide the top bar.
Another approach is to clear the contents of module topbar
; for example in view.myskin.tmpl
:
Using style sheets:%TMPL:INCLUDE{"view"}% %TMPL:INCLUDE{"topbar"}%%TMPL:END%and add:%TMPL:DEF{"topbardimensions"}%#patternTopBar, #patternClearHeaderCenter, #patternClearHeaderLeft, #patternClearHeaderRight, #patternTopBarContentsOuter { height:0px; }%TMPL:END%
See PatternSkinCssCookbookNoTopBar.
OmitUsing style sheets:%TMPL:INCLUDE{"viewleftbar"}%
to hide the left bar, or in a view template clear it using%TMPL:DEF{"viewleftbar"}%%TMPL:END%
See PatternSkinCssCookbookNoLeftBar.
view.customer.tmpl
. 'Empty' topicaction
and toolbar
by writing in the template:
In TWikiGuest, set the cover to%TMPL:INCLUDE{"view"}% %TMPL:DEF{"topicaction"}%%TMPL:END% %TMPL:DEF{"toolbar"}%%TMPL:END%
By default this topic is editable only by TWikiAdminGroup members.* Set COVER = customer
viewtopicactionbuttons.pattern.tmpl
. Remove module revisions
from %TMPL:DEF{"topicactionbuttons"}%
.
%TMPL:DEF{"topicactionbuttons"}%%TMPL:P{"activatable_raw_edit"}%%TMPL:P{"sep"}%
%TMPL:P{context="WysiwygPluginEnabled" then="activatable_edit_wysiwyg"}%%TMPL:P{context="WysiwygPluginEnabled" then="sep"}%
%TMPL:P{"activatable_attach"}%%TMPL:P{"sep"}%
%TMPL:P{"printable"}%%TMPL:P{"sep"}%
%TMPL:P{"raw"}%%TMPL:P{"sep"}%
%TMPL:P{"backlinks"}%%TMPL:P{"sep"}%
%TMPL:P{"revisions"}%%TMPL:P{"sep"}%
%TMPL:P{"activatable_more"}%%TMPL:END%
In your view.myskin.tmpl
file (see above) you write:
Test by appending%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%Remove all newlines if you copy-paste above text.
?cover=myskin
to any topic.
beforetextcontents
and aftertextcontents
, both defined in view.pattern.tmpl
. These containers can contain text or html and are placed directly before and after the topic text.
Both modules are wrapped in CSS containers: beforetextcontents
- wrapped in div
of class twikiBeforeText
aftertextcontents
- wrapped in div
of class twikiAfterText
view.myskin.tmpl
file contains:
Test by appending%TMPL:INCLUDE{"view"}% %TMPL:DEF{"beforetextcontents"}%This is the text before%TMPL:END%
?cover=myskin
to any topic.
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%
Topic PatternSkinCustomization . { Edit | WYSIWYG | Attach | Backlinks: Web All webs | Printable | History: r6 < r5 < r4 < r3 < r2 < r1 More } |
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. |