We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Codev Web>UseTemplatesEverywhere (03 Sep 2000, PeterThoeny)
Tags:
create new tag
, view all tags
[I have moved the old content of this page to the hopefully better named RevisionSelectorVariable topic. The attachment belongs there. ] ( AndreaSterbini - 01 Sep 2000)


Proposal: move templates to topics in the administration web and use INCLUDE

In my home TWiki installation I am trying to move sections of the templates in the administration web (Twiki) so that I can easily edit them.

In one of my tests I have splitted the view.tmpl template in 3 files:

  • a Twiki.TopBar topic that contains the top part of the original template
  • a Twiki.BottomBar topic that contains the bottom part of the original template
  • a view.tmpl file that contains just something like:
...

%TOPTEXT%

%LEFTTEXT% %TEXT% %RIGHTTEXT%

%BOTTOMTEXT%

In my TWikiPreferences I have added the lines:

		* Set TOPTEXT	 = %INCLUDE{"%TWIKIWEB%.TopBar"}%
		* Set LEFTTEXT	= %INCLUDE{"%TWIKIWEB%.LeftBar"}%
		* Set BOTTOMTEXT = %INCLUDE{"%TWIKIWEB%.BottomBar"}%
		* Set RIGHTTEXT  = 

Using the modifications in BetterTWikiTagTemplateProcessing all works almost fine but :

  • some variables are not replaced (e.g. the %REVISION...%)
  • all wiki links in the text refer to the web Twiki, i.e. to the web originating the included file

Revision info of the enclosing topic

I would like that the %REVISION...% variable is handled in the same way other variables are. A way could be to add that variable to the variables collected in the preferences topics. (this brings me to thinking that some variable should not be overridable by web/user preferences, shoud we open a SecurityAndVariableOverriding topic?)

References to the origin web of included topics

I would like that the text substituted in the included file refers to the destination web . In other way of usage the includer would probably like to keep the originating web references. (see ReferencesInIncludedTopics)

-- AndreaSterbini - 01 Sep 2000


Another way to solve this is to introduce WebBasedTemplateMaintenance.

-- PeterThoeny - 03 Sep 2000

TopicClassification:
FeatureBrainstorming
Topic attachments
I Attachment Action Size Date Who Comment
elsemy view.my manage 5.4 K 29 Sep 1999 - 22:26 UnknownUser A bad-looking replica of the JOS revision selector
Topic revision: r9 - 03 Sep 2000 - 20:23:46 - PeterThoeny
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback