Page 1 of 1

Displaying Categories in Summary Template

Posted: Thu Aug 30, 2018 10:13 am
by Sendlingur
I'm trying to display Categories in the Summary template for Company Directory Module.

I'm using this code snippet, but it is not working and I can't see why it is not.

Code: Select all

 {if isset($entry->canonical)}{$canonical=$entry->canonical}{/if}

       {if isset($categories)}

         {$CompanyDirectory->Lang('categories')}: 
         {foreach $categories as $catname => $rec}
	   {module_action_link action=default category=$rec->id urlonly=1 assign=url}
           <a href="{$url}" title="{$rec->description|strip_tags|summarize:40}">{$catname}</a>{if !$rec@last},  {/if}
         {/foreach}
  
       {/if}

Can someone here please help me with this?
thanks in advance

Re: Displaying Categories in Summary Template

Posted: Fri Aug 31, 2018 10:17 am
by velden
What is the output of

Code: Select all

<pre>
{$categories|print_r}
</pre>