Movable Type Documentation > Appendices > Appendix: Template Tag Modifiers

setvar

Type: modifier

This template tag will assign the output of a block or function tag to the variable specified in the attribute.

Example

Dump the output of a function tag into a variable. This will also suppress the output of this tag. Use this instead of <mt:setvarblock> when the block only contains the value of a tag.

<$mt:BlogID setvar="foo"$>

Dump the output of a block tag into a variable. This will also suppress the output of this tag. Use this when the the first and only child of the <mt:setvarblock> tag would be a block tag.

<mt:Entries setvar="foo">
    <$mt:EntryTitle$>
</mt:Entries>

Related

This page was last updated on 2008-04-17, 16:35.  

Submit a User Contributed Note

User contributed notes are a great way to share the knowledge you have gained in using Movable Type.

If you have a technical question or problem, please visit Movable Type Support.

(If you haven't left a note here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)