This question about Topic Markup Language and applications: Answered

How do I access a VARIABLE defined in another topic

I have a variable in one topic and would like to access it from another Topic. I have a solution but wondered if I am missing something?

Fetching a Variable from another Topic in another web

Fetching a Variable from another Topic in another Web: %TESTVARHELLO% in Topic NeilGoodSandbox in Sandbox web is set to:
%SEARCH{
search="TESTVARHELLO"
topic="NeilGoodSandbox"
web="Sandbox"
scope="text"
nototal="on"
nosearch="on"
type="regex"
format="$pattern(.*?TESTVARHELLO \=[\n\r]*([^\n\r]+).*)"
}%

-- NeilGood - 11 Mar 2009

yup. I have a feature request in that should be implemented in foswiki 1.1 that will simplify this.

it should result in something like (macro name and form may change)

%FORMAT{"Sandbox.NeilGoodSandbox\TESTVARHELLO"}%

QuestionForm edit

Subject Topic Markup Language and applications
Extension
Version TWikiRelease04x01x02
Status Answered
Topic revision: r3 - 11 Mar 2009, SvenDowideit - This page was cached on 16 Jun 2019 - 21:21.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy