Feature Proposal: Extend VarVAR to referencing variables defined in a topic.
Motivation
This conversation from
TWiki irc
sums up the motivation:
Lynnwood - Doesn't it seem strange that there's not an easy way to generate the list of members of TWikiAdminGroup or other groups?
There is even the local variable GROUP defined within the TWikiAdminGroup topic, but there's no easy way to call locally defined variable...
Maybe we should have a %GROUPMEMBERS{TWikiAdminGroup}% tag. [05:21]
Lynnwood Here's an idea: how about extending the syntax of INCLUDE to expand variables within the referenced topic.
So %INCLUDE{"TWikiAdminGroup" GROUP}% would render the GROUP variable as defined in that topic. [06:10]
PeterThoeny - possibly a different syntax? There is already a %VAR{"NAME" web="Web"}%
Perhaps: %VAR{ "NAME" web="Web" topic="OtherTopic" }%
Lavr - Good morning. I never understood why VAR{"NAME" web="Web"} did not also allow VAR{"NAME" topic="topic" web="Web"}. You really could use this very often. [07:15]
PeterThoeny good morning. looks like a sensible enhancement, yes
Description and Documentation
Proposed: Simply add a "topic" attribute to
VarVAR. For example:
%VAR{ "NAME" web="Web" topic="OtherTopic" }% would expand the varible
NAME from
Web.OtherTopic.
Examples
Impact and Available Solutions
Implementation
--
Contributors: LynnwoodBrown
Discussion
--
LynnwoodBrown - 16 Nov 2006
This looks like
BringTopicVarsIntoCore, and that was just waiting for
a good generic, clean, unambigous syntax. Are we there?
--
ArthurClemens - 16 Nov 2006
I noted
BringTopicVarsIntoCore as a "related topic" and now Crawford has posted
CanonicalTWikiVariables. I'm sure there are other opinions floating out there but personally, i think extending the
VarVAR syntax is pretty simple and clean.
--
LynnwoodBrown - 16 Nov 2006
See related
VARToGetValueInCurrentContext proposal.
--
Peter Thoeny - 2013-07-12
The functionality of this proposal is now covered by the
VARToGetValueInCurrentContext proposal, which makes this proposal obsolete.
--
Peter Thoeny - 2013-07-16