Advertisement:

Modify theme_linktree() variable

Aloittaja nanoarray, helmikuu 26, 2005, 09:06:25 IP

« edellinen - seuraava »

nanoarray

How do I change that variable so that it doesn't show the first 2 items?

eg, Home | item 1 | item 2 | item 3

I want to get rid of Home and item 1.

[Unknown]

Lainaus käyttäjältä: nanoarray - helmikuu 26, 2005, 09:06:25 IP
How do I change that variable so that it doesn't show the first 2 items?

eg, Home | item 1 | item 2 | item 3

I want to get rid of Home and item 1.

It's not a variable.  It's in the index template:

// Show a linktree.  This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;

array_shift($context['linktree']);
array_shift($context['linktree']);

// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav"', $settings['linktree_inline'] ? ' style="font-size: smaller;"' : '', '>';

// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show the | | |-[] Folders.
if (!$settings['linktree_inline'])
{
if ($link_num > 0)
echo str_repeat('<img src="' . $settings['images_url'] . '/icons/linktree_main.gif" alt="| " border="0" />', $link_num - 1), '<img src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />';
echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
}

// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo $settings['linktree_inline'] ? ' &nbsp;|&nbsp; ' : '<br />';
}

echo '</span>';
}


That should do what you want.

-[Unknown]

Advertisement: