(zettel (meta (back "00001007031100") (backward "00001007031100") (box-number "1") (created "20220809132350") (forward "00001004020000 00001006050000 00001007040000 00001007040324 00001007050000") (modified "20220926183331") (published "20220926183331") (role "manual") (syntax "zmk") (tags "#manual #zettelmarkup #zettelstore") (title "Zettelmarkup: Zettel Transclusion")) (rights 4) (encoding "") (content "A zettel transclusion is specified by the following sequence, starting at the first position in a line: ''{{{zettel-identifier}}}''.\n\nWhen evaluated, the referenced zettel is read.\nIf it contains some transclusions itself, these will be expanded, recursively.\nWhen a recursion is detected, expansion does not take place.\nInstead an error message replaces the transclude specification.\n\nAn error message is also given, if the zettel cannot be read or if too many transclusions are made.\nThe maximum number of transclusion can be controlled by setting the value [[''max-transclusions''|00001004020000#max-transclusions]] of the runtime configuration zettel.\n\nIf everything went well, the referenced, expanded zettel will replace the transclusion element.\n\nFor example, to include the text of the Zettel titled \"\"Zettel identifier\"\", just specify its identifier [[''00001006050000''|00001006050000]] in the transclude element:\n```zmk\n{{{00001006050000}}}\n```\nThis will result in:\n:::example\n{{{00001006050000}}}\n:::\n\nPlease note: if the referenced zettel is changed, all transclusions will also change.\n\nThis allows, for example, to create a bigger document just by transcluding smaller zettel.\n\nIn addition, if a zettel __z__ transcludes a zettel __t__, but the current user is not allowed to view zettel __t__ (but zettel __z__), then the transclusion will not take place.\nTo the current user, it seems that there was no transclusion in zettel __z__.\nThis allows to create a zettel with content that seems to be changed, depending on the authorization of the current user.\n\n---\nAny [[attributes|00001007050000]] added to the transclusion will set/overwrite the appropriate metadata of the included zettel.\nOf course, this applies only to thoes attribtues, which have a valid name for a metadata key.\nThis allows to control the evaluation of the included zettel, especially for zettel containing a diagram description.\n\n=== See also\n[[Inline-mode transclusion|00001007040324]] does not work at the paragraph / block level, but is used for [[inline-structured elements|00001007040000]]."))