aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages/views/default/sitepages/metatags.php
blob: c536dbe29cb3101a9ba995f4f614c4cc98453d16 (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
29
30
31
32
33
34
35
<?php
/**
 * Add any additional defined metatags or CSS.
 *
 * @package SitePages
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2010
 * @link http://elgg.org/
 */

$meta_details = sitepages_get_sitepage_object('seo');

if ($meta_details) {
	$metatags = $meta_details->title;
	$description = $meta_details->description;

	echo <<<___END
	<meta name="description" content="$description" />
	<meta name="keywords" content="$metatags" />
___END;
}

// only show on the custom front page.
if (get_context() == 'sitepages:front') {
	$custom_css = sitepages_get_sitepage_object('front');

	if ($custom_css && $custom_css->title) {
		echo "
		<style>
		{$custom_css->title}
		</style>
		";
	}
}