이 문서는 https://tiddlywiki.com/languages/ko-KR/에서 티들리위키의 정적 HTML 표현의 일부입니다

ImportVariablesWidget

2018년 9월 28일 오후 3:00

Introduction

The ImportVariablesWidget imports macro and variable definitions from a list of other tiddlers and makes them available to its children. For example:

<$importvariables filter="[tag[mySpecialMacros]]">
All the macros defined in tiddlers with the tag "mySpecialMacros" are available here
</$importvariables>

Attributes and Content

The content of the importvariables widget is the scope within which the imported variable definitions are available.

AttributeDescription
filterTiddler filter defining the tiddlers from which macro definitions will be imported

Global Macros

So-called global macros are implemented within the main page template ($:/core/ui/PageTemplate) by wrapping the page content in the following importvariables widget:

<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]">
...
</$importvariables>

\import Pragma

Introduced in v5.1.18 The Pragma: \import is an alternative syntax for using the ImportVariablesWidget. For example, the previous example could be expressed as:

\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]