System Links on sidebar

TacoT

Joined: 2005-04-10
Posts: 2
Posted: Sun, 2005-04-10 13:42

I would like to have the system links on the sidebar. In \g2\templates\sidebar.tpl I found the following code:

{* System links in sidebar? *}
  {if (!empty($layout.show.systemLinks) && !empty($layout.systemLinks))}
  <div class="gbBlock">
    {if $layout.show.sidebarGreeting}
    <h3>
      {g->text text="Welcome, %s" arg1=$layout.user.fullName|default:$layout.user.userName}
    </h3>
    {/if}
    <ul>
    {foreach from=$layout.systemLinks item=link}
      <li><a href="{$link.url}">{$link.text}</a></li>
    {/foreach}
    </ul>
  </div>
  {/if}

My question is, why don't the systemlinks show up on my sidebar? Why are $layout.show.systemLinks and/ or $layout.systemLinks empty?
I can solve the problem if I delete {if (!empty($layout.show.systemLinks) && !empty($layout.systemLinks))} {/if}, but I would really like to adjust my theme without touching anything outside the themes- or layouts-directory.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-04-10 19:59

show.systemLinks is false because matrix layout already puts the system links in the top pathbar. Some other layouts like hybrid set show.systemLinks to true because they don't have a pathbar.

 
TacoT

Joined: 2005-04-10
Posts: 2
Posted: Sun, 2005-04-10 21:01

Thanks mindless!

I figured it out. In my customized version of matrix I added in my layout.inc file under function _loadAlbumTemplate(&$template, $item, $params) the following line

$layout['show']['systemLinks'] = true;

That did the trick!