Best Bets Not Showing On the Frontend

Funnelback v 15.10

I added a bets bets but its not showing up on the frontend.

         <#if (response.resultPacket.bestBets)!?size &gt; 0>
         <ol id="search-best-bets" class="list-unstyled">
      
        <#list response.curator.exhibits as exhibit>
          <#if exhibit.titleHtml?? && exhibit.linkUrl??>
            <li class="alert alert-warning">
              <h4><a href="${exhibit.linkUrl}"><@s.boldicize><#noescape>${exhibit.titleHtml}</#noescape></@s.boldicize></a></h4>
              <#if exhibit.displayUrl??><cite class="text-success">${exhibit.displayUrl}</cite></#if>
              <#if exhibit.descriptionHtml??><p><@s.boldicize><#noescape>${exhibit.descriptionHtml}</#noescape></@s.boldicize></p></#if>
            </li>
          </#if>
        </#list>

      <@s.BestBets>
        <li class="alert alert-warning">
          <#if s.bb.title??><h4><a href="${s.bb.clickTrackingUrl}"><@s.boldicize>${s.bb.title}</@s.boldicize></a></h4></#if>
          <#if s.bb.title??><cite class="text-success">${s.bb.link}</cite></#if>
          <#if s.bb.description??><p><@s.boldicize><#noescape>${s.bb.description}</#noescape></@s.boldicize></p></#if>
          <#if ! s.bb.title??><p><strong>${s.bb.trigger}:</strong> <a href="${s.bb.link}">${s.bb.link}</a></p></#if>
        </li>
      </@s.BestBets>
      </ol>
    </#if>

I do however do have a nested results template:

      <div id="search_results" class="" start="${response.resultPacket.resultsSummary.currStart}">       
          <@s.Results>         
         <#if s.result.class.simpleName != "TierBar">       
           <@Result.ResultItems />       
        </#if>
        </@s.Results>
        </div>

Would cause the best bets not showing?
Thanks in advance
N

You are only checking for existence of old style best bets.

Since 15.0 best bets are actually a special type of curator exhibit.

This is the code from the default template - note the extra conditional:

        <#assign curatorAdvertPresent = false />
        <#list response.curator.exhibits as exhibit>
            <#if exhibit.titleHtml?? && exhibit.linkUrl??>
                <#assign curatorAdvertPresent = true />
                <#break>
            </#if>
        </#list>

        <#if (response.resultPacket.bestBets)!?size &gt; 0 || curatorAdvertPresent >
          <ol id="search-best-bets" class="list-unstyled">
            <#-- Curator exhibits -->
            <#list response.curator.exhibits as exhibit>
              <#if exhibit.titleHtml?? && exhibit.linkUrl??>
                <li class="alert alert-warning">
                  <h4><a href="${exhibit.linkUrl}"><@s.boldicize><#noescape>${exhibit.titleHtml}</#noescape></@s.boldicize></a></h4>
                  <#if exhibit.displayUrl??><cite class="text-success">${exhibit.displayUrl}</cite></#if>
                  <#if exhibit.descriptionHtml??><p><@s.boldicize><#noescape>${exhibit.descriptionHtml}</#noescape></@s.boldicize></p></#if>
                </li>
              </#if>
            </#list>
            <#-- Old-style best bets -->
            <@s.BestBets>
              <li class="alert alert-warning">
                <#if s.bb.title??><h4><a href="${s.bb.clickTrackingUrl}"><@s.boldicize>${s.bb.title}</@s.boldicize></a></h4></#if>
                <#if s.bb.title??><cite class="text-success">${s.bb.link}</cite></#if>
                <#if s.bb.description??><p><@s.boldicize><#noescape>${s.bb.description}</#noescape></@s.boldicize></p></#if>
                <#if ! s.bb.title??><p><strong>${s.bb.trigger}:</strong> <a href="${s.bb.link}">${s.bb.link}</a></#if>
              </li>
            </@s.BestBets>
          </ol>
        </#if>
1 Like

Thank you plevan, that fixed it. Your code however didn’t come with the default template shrug!
In the best bet detail screen I’m also having trouble with adding trigger keywords. Is it comma separated? If I try to add more than one word again it fails to show. I tried accounting, commerce, financial planning

Regards
NickyP

The code above was extracted from the default template (which will become the simple.ftl of any new collection created on the server) provided with Funnelback 15.10.

How your trigger matches depends on what you choose when defining best bets.

You can’t define multiple triggers for a single best bet unless you define a regex trigger - if you don’t know what regex is I wouldn’t attempt it unless you’re fairly technical as it’s very easy to get it wrong.

The regex trigger you’d need for your above example would look something like

(?i)\baccounting\b|\bcommerce\b|\bfinancial planning\b

Yep familiar with regex so I’ll use that - just got a demo on curator so ill be using that in the future :slight_smile:
Thankyou
NickyP