Tags:
create new tag
, view all tags

Question

Question/observation regarding AmbarSkin

Observation: The %TMPL:INCLUDE{"twiki"}% (or any INCLUDE of an additional template) does not appear to "take". I am not a wizard at creating skins as I just started - am I correct or have I completely missed something? I ran into this because our company has a standard header that gets included at the top of every webpage. We have a TWiki template that was created to add onto skins (it is included in the standard TWiki skins) but Ambar appears to ignore Includes. Any idea what is going on? I tried several changes but nothing made a difference.

Thanks

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Unix (solaris)
Web server: Apache/1.3.26 Server
Perl version: 5.6.0
Client OS: WinXP Pro
Web Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.1

-- SteveRJones - 05 Aug 2003

Answer

AmbarSkin does not appear to use the inheritance model of the twiki templating system uses. There needs to be a file named twiki.ambar.tmpl which defines the constructs to be used in common across the template files. The %TMPL:INCLUDE{"twiki"}% statement actually looks for twiki.ambar.tmpl, and only goes to twiki.tmpl if that file is not found.

Don't feel bad for not getting this. I beat my head against the wall for weeks on this before somebody clued me in. I've been meaning to start a SkinDeveloperHowTo for things like this, but I still don't really understand the templating system myself.

-- MattWilkie - 05 Aug 2003

Well, that does explain a few things -- I hope the developer sees your note in AmbarSkinDev. I'll try posting a referral to this page and see if we get an answer.

BTW, is it possible to tell the INCLUDE to go directly to the twiki.tmpl file?

Thanks

-- SteveRJones - 06 Aug 2003

Well, I tried providing a copy of the file twiki.ambar.tmpl available but the ambar template still does not load the twiki template as an include. I haven't seen anything from the skin developer -- any other clues?

-- SteveRJones - 08 Aug 2003

Steve, looking at the files you sent to me, I figured the issue. Just including the additional template file would not print the additional header template. All that the included file does is to define templates using %TMPL:DEF{"foo"}%. However, back in the AmbarSkin these templates are not being printed anywhere using a %TMPL:P{"foo"}%. The default twiki template and probably a few other templates use this, but AmbarSkin does not use the same names. In order for this to be rendered, you can change AmbarSkin templates by inserting %TMPL:P{"foo"}% at the desired place where you would like the headers printed.

-- RaviASV - 11 Aug 2003

Success! My basic non-understanding of TWiki templates and how the includes worked really was my problem -- nothing regarding your templates but you gave me the clue. I've now integrated our corp header PLUS added the new TWiki logos.

thanks again!

-- SteveRJones - 11 Aug 2003

Topic revision: r6 - 2003-08-11 - SteveRJones
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by PerlIdeas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.