Jump to content

Odd Knowledgebase template output


Recommended Posts

I am using the Six Template and all looks fine except for the Knowledgebase page. When I visit domain.com/knowledgebase.php all I see is a blank white screen with "Categories" text and a search box in the top-left corner.

 

Here is a screenshot of what I see:

 

Screen Shot 2016-05-17 at 3.38.04 PM.png

 

 

There appears to be something missing but I don't know where it is. I checked many other files but cannot see anything wrong. Anyone have an idea where I made a mistake somewhere?

 

- - - Updated - - -

 

Ahhh, I have been struggling with this problem for a few days and I just found the source of the problem after I posted this. But I still am unclear WHY it is a problem.

 

So I removed this code from the knowledgebase.tpl and it worked fine:

 

{if $kbcats}
   <div class="row kbcategories">
       {foreach from=$kbcats name=kbcats item=kbcat}
           <div class="col-sm-4">
               <a href="{if $seofriendlyurls}{$WEB_ROOT}/knowledgebase/{$kbcat.id}/{$kbcat.urlfriendlyname}{else}knowledgebase.php?action=displaycat&catid={$kbcat.id}{/if}">
                   <span class="glyphicon glyphicon-folder-close"></span> {$kbcat.name} <span class="badge badge-info">{$kbcat.numarticles}</span>
               </a>
               <p>{$kbcat.description}</p>
           </div>
           {if $smarty.foreach.kbcats.iteration mod 3 == 0}
               <div class="clearfix"></div>
           {/if}
       {/foreach}
   </div>
{else}
   {include file="$template/includes/alert.tpl" type="info" msg=$LANG.knowledgebasenoarticles textcenter=true}
{/if}

 

 

Any idea why the above is causing problems?

 

- - - Updated - - -

 

Ok ok, sorry to keep pinging this forum but now I am finding the problem exactly.

 

This is the errant code:

 

            {if $smarty.foreach.kbcats.iteration mod 3 == 0}
               <div class="clearfix"></div>
           {/if}

 

If I removed that only, then all works fine. So is there an issue with the smarty there?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated