Location: PHPKode > projects > Enigma > Enigma2/Enigma2_Install/Themes/Enigma/portal/Pages.template.php
<?php
// Version: 1.0 RC1; Pages

function template_display_page()
{
	global $context;

	$context['no_trail'] = !empty($context['no_trail']) ? $context['no_trail'] : 0;
	if (!$context['no_trail'])
		echo theme_linktree(), '<br /><br />';

	if ($context['phpe'] == 1)
	{
		eval($context['page_content']);
	}
	else
		echo $context['page_content'];
}

function template_list()
{
	global $context, $scripturl, $settings, $txt;

	echo theme_linktree(), '<br /><br />';

	// Print folders list
	if (is_array($context['curr_folder']))
	{
		echo '
	<table width="100%" border="0" class="bordercolor" cellspacing="1" align="center">
		<tr>
			<td class="catbg">
				<b>', (($context['crumb'] > 0) ? 'Sub ' : ''), $txt['pages_03'], '</b></td>
		</tr>';

		foreach ($context['curr_folder'] as $curr_folder)
		{
			echo '<tr>
			<td class="windowbg2">',
				($context['useicons']) ? '<img src="' . $settings['theme_url'] . '/images/board.gif" alt="' . $txt['pages_04'] . '" />' : '&nbsp;',
				' <a href="',
				(($curr_folder['empty'] > 0) ? $scripturl . '?op=PageListing&amp;folder=' . $curr_folder['id'] . '">' : '#" title="' . $txt['pages_05'] . '">'), $curr_folder['name'], '</a></td>
		</tr>';
		}

	echo '
	</table><br />
';
	}

	// Print pages list
	if (is_array($context['curr_page']))
	{
		echo '
	<table width="100%" border="0" class="bordercolor" cellspacing="1" align="center">
		<tr>
			<td class="catbg">
				<b>', $context['foldername'], ' ', $txt['pages_06'], '.</b></td>
		</tr>';

		foreach ($context['curr_page'] as $curr_page)
		{
			echo '<tr>
			<td class="windowbg2">',
				($context['useicons']) ? '<img src="' . $settings['theme_url'] . '/images/dir_php.gif" alt="' . $txt['pages_07'] . '" />' : '&nbsp;',
				' <a href="', $scripturl, '?page=', $curr_page['stitle'], '">', $curr_page['title'], 

'</td>
		</tr>';
		}

	echo '
	</table><br />
';
	}

	// if there is nothing to display
	if ($context['curr_folder'] == 0 && $context['curr_page'] == 0)
	{
		echo '
	<table width="100%" border="0" class="bordercolor" cellspacing="1" align="center">
		<tr>
			<td class="catbg">
				<b>', $txt['pages_08'], '</b></td>
		</tr><tr>
			<td class="windowbg2">', $txt['pages_09'], '</td>
		</tr>
	</table><br />';
	}
}

?>
Return current item: Enigma