1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I set an array ($threads) with xen:set

Discussion in 'XenForo Development Discussions' started by Marcus, Oct 14, 2015.

  1. Marcus

    Marcus Well-Known Member

    I have an existing array $newThreads and want to push it to an included template:

            <xen:include template="addon_template" >
    xen:set var="$threads">{$newThreads}</xen:set>
    In the addon_template {xen:helper dump, $threads} returns
  2. Chris D

    Chris D XenForo Developer Staff Member

    Use <xen:map> instead.
    Marcus likes this.
  3. Marcus

    Marcus Well-Known Member

    Thank you so much, Chris D! My code is much cleaner now.

    For my reference, xen:map (explanation)

Share This Page