<?php global $tags, $scale, $module_settings, $target, $tagged_pages; ?>

<?php if(isset($_GET['tag'])) { ?>
	<div class="tagged-pages">
		<h1><?php echo txt('tag-cloud', 'Seiten mit'); ?>: <?php echo $_GET['tag']; ?></h1>
		
		<ol>
			<?php foreach($tagged_pages as $page_entry) { ?>
				<li>
					<h3><a title="<?php echo $page_entry['description']; ?>" href="<?php echo $page_entry['href']; ?>"><?php echo $page_entry['title']; ?></a></h3>
					<p><?php echo $page_entry['description']; ?></p>
					<p class="small"><?php echo txt('tag-cloud', 'Schlüsselwörter'); ?>: <?php echo $page_entry['tags']; ?></p>
				</li>
			<?php } ?>
		</ol>
	</div>
<?php } else { ?>
	<div class="tag-cloud">
		<ol>
			<?php foreach($tags as $tag => $links) { ?>
				<li class="tagsize<?php echo $scale[$links]; ?>"><a title="<?php echo $tag; ?>" href="<?php echo $target . $tag; ?>"><?php echo $tag; ?></a></li>
			<?php } ?>
		</ol>
	</div>
<?php } ?>