01.12.2012 Views

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tab. 16.2<br />

Web-specific<br />

skins<br />

242<br />

��<br />

��<br />

��<br />

Class Topic<br />

WebSkeletonTable Pertains to <strong>the</strong> entire skeleton<br />

TD.WebLeftBar FlexibleSkinLeftBar<br />

TD.WebRightBar FlexibleSkinRightBar<br />

TD.WebTopBar FlexibleSkinTopBar<br />

TD.WebBottomBar FlexibleSkinBottomBar<br />

TD.WebContent FlexibleSkinTopicHeader<br />

FlexibleSkinTopicFooter<br />

FlexibleSkinPrintingHeader<br />

FlexibleSkinPrintingFooter<br />

Now you can influence <strong>the</strong> interplay between HTML and CSS directly<br />

from <strong>the</strong> TWiki.<br />

The use of FlexibleSkin is also appealing because <strong>the</strong> pages describing<br />

<strong>the</strong> layout can be defined individually for every web. That is<br />

why <strong>the</strong>re are two different modes of loading <strong>the</strong> skin. With<br />

skin=globalFlexible, <strong>the</strong> template relates to <strong>the</strong> files stored<br />

globally in <strong>the</strong> TWiki web. However, if a skin is only set to flexible,<br />

<strong>the</strong> files from a particular web are used.<br />

Tip: When developing your own layout, it is not advisable to set it<br />

as <strong>the</strong> standard, especially if several people are using <strong>the</strong> TWiki.<br />

Thus, include a link to <strong>the</strong> view of <strong>the</strong> current page in FlexibleSkin<br />

on <strong>the</strong> page Main.WebLeftBar. That way, you can still easily view<br />

any page with your skin.<br />

Usually a uniform layout is selected for all webs with only minor<br />

differences. Unfortunately, you have to decide for every web if <strong>the</strong><br />

global design is to be used, or whe<strong>the</strong>r you wish to generate a completely<br />

new one. However, we know a trick that will help you get<br />

around this. In every web that is to deviate from <strong>the</strong> global layout,<br />

generate all necessary topics. Now, integrate <strong>the</strong> version from <strong>the</strong><br />

TWiki web into <strong>the</strong> special topics that are not to differ from <strong>the</strong><br />

global layout by simply using %INCLUDE%. Thus, for instance, you<br />

would use.:<br />

%INCLUDE{"TWiki.FlexibleSkinTopBar"}%<br />

Now you only have to generate those special topics that differ from<br />

<strong>the</strong> global layout.<br />

Note: Remember that <strong>the</strong> embedding process turns all Includes in<br />

<strong>the</strong> global topic into second-class Includes. This means that special<br />

topics, and not <strong>the</strong> actual article, will become <strong>the</strong><br />

16 Designing a TWiki

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!