I just fixed the
NewBugTemplate topic, somebody edited a new bug report into
the topic not realizing that it wasn't meant to be edited directly.
This brings up an interesting point, is there a way to put extra info into a template
that will not be pulled in when the template is used?
I am thinking of something like:
Do not edit this topic. See BugReports to create a new bug
%STARTTEMPLATE%
some template text
%ENDTEMPLATE%
* put some access commands here to prevent editing except by template admins
Comments?
--
JohnRouillard - 07 Aug 2002
IIUC, it's enough if warning "Do not edit this topic - CANCEL edit and do not save" is visible in edit.
So it can be done using standard
HTML comment tag (
<!-- HTML comments --> ), like test warning below:
Warning above is
HTML comments, visible only in
edit. Is it good enough for what you wanted?
--
PeterMasiar - 15 Aug 2002
This happened a few months ago as well - I did put some warning text that was visible in View mode as well but it was taken out. Might be simplest to make it editable only by
TWikiAdminGroup.
--
RichardDonkin - 15 Aug 2002
I did a different approach: The
%NOP% variable gets already removed from the template topic at the time when a topic is created. Spinning this further:
TWiki has now a new
%NOP{ ... }% variable that does this:
Topic view:
%NOP{ and }% get removed, but content inside curley brackets is visible
Topic creation based
on template topic:
%NOP{ ... }% gets removed, including content
Note:
- Unlike other variables,
%NOP{ ... }% can span multiple lines.
- The scan for the closing
}% pattern is non-greedy, that is, it stops at the first occurance. That means variables with parameters cannot be used inside NOP.
- Workaround for variables inside
%NOP{ ... }%: Insert a %NOP% between } and %. Silly example: %NOP{ %GMTIME{"$year"}%NOP%% }%.
See example in action:
- View NewBugTemplate: Help text and access restriction is shown; both bullets are inside the brackets
- Edit NewBugTemplate (actually view in edit mode): See how it looks like in edit mode.
- Add a new BugReport: NOP, help text and access restriction get removed.
In
TWikiAlphaRelease and at TWiki.org
--
PeterThoeny - 30 Oct 2002
What specifically is still needed to bring this
BeijingRelease feature status up from 0% documentation?
--
GrantBow - 09 Jan 2003
The new feature needs to be documented in
TWikiTemplates
--
PeterThoeny - 09 Jan 2003
This is covered in the TWiki documentation for release 4, so I'm unmarking this as a Cookbook and marking it as
CategoryStale.
--
CrawfordCurrie - 12 Mar 2006