Displaying Categories in Summary Template

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Forum Members
Forum Members
Posts: 61
Joined: Wed Aug 08, 2018 4:59 pm

Displaying Categories in Summary Template

Post 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)}

         {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}

Can someone here please help me with this?
thanks in advance
User avatar
Dev Team Member
Dev Team Member
Posts: 3315
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Displaying Categories in Summary Template

Post by velden »

What is the output of

Code: Select all

Post Reply

Return to “Modules/Add-Ons”