Moving Action Items from Sidebar to Pathbar

lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Tue, 2004-11-30 02:33

In my layout that I am creating I want all of the Action Items up in the Pathbar like the name and the login. So I copied

      {foreach from=$layout.itemLinks item=link}
      <li><a href="{$link.url}">{$link.text}</a></li>
      {/foreach}

from the sidebar.tpl to pathbar.tpl and nothing shows up so then I tried

  {if ($layout.show.sidebarActions && !empty($layout.itemLinks))}
      {foreach from=$layout.itemLinks item=link}
      <li><a href="{$link.url}">{$link.text}</a></li>
      {/foreach}
  {/if}

But that didn't work either. Does anyone know how to do this?

Thanks,

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2004-11-30 05:09
lvthunder wrote:
In my layout that I am creating I want all of the Action Items up in the Pathbar like the name and the login. So I copied

      {foreach from=$layout.itemLinks item=link}
      <li><a href="{$link.url}">{$link.text}</a></li>
      {/foreach}

from the sidebar.tpl to pathbar.tpl

That's a neat idea. I tried that also. I just copied those lines into the bread crumb and they showed up for me. My breadcrumb looks like this, now:

<ul class="gbBreadCrumb"> 
  {section name=parent loop=$layout.parents} 
  <li {if $smarty.section.parent.first}class="giBreadCrumbFirst"{/if}> 
    {if ! $smarty.section.parent.last} 
    <a href="{g->url arg1="view=core:ShowItem" arg2="itemId=`$layout.parents[parent].id`" arg3="highlightId=`$layout.parents[\
parent.index_next].id`"}">{$layout.parents[parent].title|default:$layout.parents[parent].pathComponent|markup}</a> 
    {else} 
    <a href="{g->url arg1="view=core:ShowItem" arg2="itemId=`$layout.parents[parent].id`" arg3="highlightId=`$layout.item.id`\
"}">{$layout.parents[parent].title|default:$layout.parents[parent].pathComponent|markup}</a> 
    {/if} 
  </li> 
  {/section} 
  <li {if empty($layout.parents)}class="giBreadCrumbFirst"{/if}> 
    {$layout.item.title|default:$layout.item.pathComponent|markup} 
  </li> 
 
  {foreach from=$layout.itemLinks item=link} 
  <li><a href="{$link.url}">{$link.text}</a></li> 
  {/foreach} 
</ul> 

Is that what yours looked like after your change?

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Tue, 2004-11-30 19:41

Not quite. I want the actions to come after the login/logout in the menu not in the bread crumb so my code looks like this except for some reason mine doesn't work. I also want to flip the order so if the window is not big enough the links go to two lines not the bread crumb.

<div id="gsSystemLinks">
  <ul>
  {if $layout.show.sidebarGreeting}
  <li>
    {g->text text="Welcome, %s" arg1=$layout.user.fullName|default:$layout.user.userName}
  </li>
  {/if}
  {foreach from=$layout.systemLinks item=item}
  <li>
    <a href="{g->url params=$item.params}">{$item.text}</a>
  </li>
  {/foreach}
        {foreach from=$layout.itemLinks item=link}
      <li><a href="{$link.url}">{$link.text}</a></li>
      {/foreach}
  </ul>
</div>

<ul class="gbBreadCrumb">
  {section name=parent loop=$layout.parents}
  <li {if $smarty.section.parent.first}class="giBreadCrumbFirst"{/if}>
    {if ! $smarty.section.parent.last}
    <a href="{g->url arg1="view=core:ShowItem" arg2="itemId=`$layout.parents[parent].id`" arg3="highlightId=`$layout.parents[parent.index_next].id`"}">{$layout.parents[parent].title|default:$layout.parents[parent].pathComponent|markup}</a>
    {else}
    <a href="{g->url arg1="view=core:ShowItem" arg2="itemId=`$layout.parents[parent].id`" arg3="highlightId=`$layout.item.id`"}">{$layout.parents[parent].title|default:$layout.parents[parent].pathComponent|markup}</a>
    {/if}
  </li>
  {/section}
  <li {if empty($layout.parents)}class="giBreadCrumbFirst"{/if}>
    {$layout.item.title|default:$layout.item.pathComponent|markup}
  </li>
</ul>
 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2004-12-03 05:12

I'm not the best person to help you with this stuff (I have zero UI ability). But if I understand what you're asking, then you can just create a second breadcrumb bar and put it at the bottom of pathbar.tpl, like this:

<ul class="gbBreadCrumb"> 
  {foreach from=$layout.itemLinks item=link} 
  <li><a href="{$link.url}">{$link.text}</a></li> 
  {/foreach}  
</ul>

You can define your own CSS class if you don't want to reuse gbBreadCrumb. Put it at the end of layouts/lvthunder/layout.css.php and define it any way that you want.

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Fri, 2004-12-03 19:13

Thanks for you help. Now I feel really dumb. The reason it wasn't working was I forgot to change the path to the include files in albumbody.tpl and singlebody.tpl so it was reading the original ones in the matrix layout not my modified ones.

 
cyggie

Joined: 2007-10-21
Posts: 2
Posted: Sun, 2007-10-21 14:12

I'd like to do that too, but I'm using the carbon theme.
In sidebar.tpl, the code looks like this:

{* Show the sidebar blocks chosen for this theme *}
{foreach from=$theme.params.sidebarBlocks item=block}
{g->block type=$block.0 params=$block.1 class="gbBlock"}
{/foreach}
{g->block type="core.NavigationLinks" class="gbBlock"}

The problem is that I have "item links" and "links to album/photo peers" blocks enabled but I only want to display the item links in my header.
How do you selectively display that since this code pulls out all blocks?