Page 2 of 2

Re: Link Manager show category name then links

Posted: Thu Jul 17, 2014 11:23 pm
by KitchM
Rolf,
It is version 2.0. I do not remember any upgrade to it.

velden,
Thanks for clarifying. That makes all the difference.

Re: Link Manager show category name then links

Posted: Fri Jul 18, 2014 2:21 pm
by Rolf
New install LinkMgr contains a template with category displaying by default.

1. Add in page {LinkMgr}
2. Open LinkMgr admin page
3. Open the templates tab
4. Set template default_category true/default

That is all it takes!


For others, the template content is:

Code: Select all

<div class="linkmgr">
  {foreach from=$items item='item'}
    {if $foo|default:'' != $item.link_category}
      <h3>{$item.link_category}</h3>
    {/if}
    <p><a href="{$item.link_url}" target="_blank">{$item.link_name}</a><br />{$item.link_desc|default:''}</p>
    {$foo = $item.link_category}
  {/foreach}
</div>

Re: [Solved] Link Manager show category name then links

Posted: Fri Jul 18, 2014 3:29 pm
by KitchM
Thanks, Rolf. I always love your clear instructions. I wish all were as clear.

I did as you suggested, but the default, and only, template is entitled "default". I do not see the one that is called "default_category". Therefore, "default" is active by default.

So I viewed the one named default. It contains:

Code: Select all

<div class="linkmgr">
<ul>
{foreach from=$items item="item"}
    <li><a href="{$item.link_url}" target="_blank">{$item.link_name}</a> - {$item.link_desc}</li>
{/foreach}
</ul>
</div>
So I created a new one named default_category, and then pasted in your suggested code. After submitting that one and then reloading the web page, it displayed as it should.

Woo hoo!!! You, sir, are awesome! Thank you so much for that solution. 8)

Too bad the LinkManager module does not work as it states. Everyone needs to note that just using one of the smarty tags they give in the instructions will do nothing without creating the necessary code, as well as the associated template, which one needs to figure out one's self.

Thanks again, Rolf!