Question
I have a presentation before my division director tomorrow on TWiki. To show how versatile it is,
I decided to use TWiki to present itself. I am using the
TWikiPlatformPresentation layout
and I have added this:
% INCLUDE{"% SCRIPTURL%/view/% WEB%/% TOPIC% Comments% CALC{"T(R5:C5)"}%"}%
(spaces put in after % to stop TWiki from interpreting the variables)
to the bottom of the slide intending that the topic comment page associated with the slide gets included.
However I am getting a wacky included topic being presented:
SlideShowPresentationCommentsÊLC
If I put:
% SCRIPTURL%/view/% WEB%/% TOPIC% Comments% CALC{"T(R5:C5)"}%
on the page just before the % INCLUDE the generated link is correct. I assume its some glitch
in the include parser, but I am afraid I haven't been able to find out where.
Does anybody have any ideas on how this could work? I have looked at the search formatting items
and tried $percnt, \" $quot etc to escape some of the things that may be confusing include, but
to no avail.
- TWiki version: Alpha
- Web server: apache 1.3.2
- Server OS: linux 7.2 Red Hat
- Web browser: N/A
- Client OS: N/A
--
JohnRouillard - 21 Aug 2002
Answer
There are two problems. First, INCLUDE is evaluated before the Plugin callback to expand CALC, see
TWiki::handleCommonTags(). Second, the INCLUDE parsing is non-greedy, e.g. stops at the closing tag of CLAC.
You could try to turn it around. Not tested, but something along the line
% CALC{"$CHAR(37)INCLUDE{$CHAR(34)$CHAR(37)TOPIC$CHAR(37)Comments$T(R5:C5)$CHAR(34)}$CHAR(37)"}%
The $CHAR(34) and $CHAR(37) is a trick to escape the include from happening too early. They resolve to double quote and percent, respectively.
--
PeterThoeny - 25 Aug 2002