aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/listtype.php
blob: c4693313b54653f3f1fbb8644f6e429a977fd226 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
 * Elgg list view switcher
 *
 * @package Elgg
 * @subpackage Core
 */

$baseurl = elgg_http_remove_url_query_element($vars['baseurl'], 'search_listtype');

if ($vars['listtype'] == "list") {
	$listtype = "gallery";
} else {
	$listtype = "list";
}

if (substr_count($baseurl,'?')) {
	$baseurl .= "&search_listtype=" . $listtype;
} else {
	$baseurl .= "?search_listtype=" . $listtype;
}

?>

<p class="margin_top">
	<?php echo elgg_echo("listtype:change") ?>:
	<a href="<?php echo $baseurl; ?>"><?php echo elgg_echo("listtype:{$listtype}"); ?></a>
</p>