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

Thread Preview Text?

Discussion in 'XenForo Development Discussions' started by nrep, Aug 18, 2013.

  1. nrep

    nrep Well-Known Member

    Is there any way to grab the thread preview text in "thread_list_item"? I've tried a few methods, but can't find one that works.

    It's currently using an external URL for the thread preview popup:

    {xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}
    I'm trying to get the preview text to appear under the thread title, so I need to grab that data as a variable.

    The search code uses this string to display it, but I don't have the post data available in thread_list_item:

    <a href="{xen:link threads, $thread}">{xen:helper snippet, $post.message, 150, {xen:array 'term={$search.search_query}', 'emClass=highlight', 'stripQuotes=1'}}</a>
    Is there any way round this in templates?
  2. JulianD

    JulianD Well-Known Member

    The preview is fetched through ajax so I guess XenForo doesn't include it in the template variable to save up memory. I guess it would be possible to make the preview available with a small addon.

Share This Page