aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/Cobrand.pm26
-rw-r--r--perllib/Cobrands/Emptyhomes/Util.pm13
-rw-r--r--perllib/Page.pm4
3 files changed, 37 insertions, 6 deletions
diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm
index e170ec87d..f450304b5 100644
--- a/perllib/Cobrand.pm
+++ b/perllib/Cobrand.pm
@@ -7,7 +7,7 @@
# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved.
# Email: louise@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: Cobrand.pm,v 1.21 2009-09-23 15:43:54 louise Exp $
+# $Id: Cobrand.pm,v 1.22 2009-09-23 17:01:00 louise Exp $
package Cobrand;
use strict;
@@ -365,12 +365,14 @@ sub header_params {
}
}
-=item root_path_pattern COBRAND
+=item root_path_js COBRAND
+
+Return some js to set the root path from which AJAX queries should be made
=cut
sub root_path_js {
- my ($cobrand) = @_;
+ my ($cobrand) = @_;
my $handle;
if ($cobrand){
$handle = cobrand_handle($cobrand);
@@ -382,6 +384,24 @@ sub root_path_js {
}
}
+=item site_title COBRAND
+
+Return the title to be used in page heads.
+
+=cut
+sub site_title {
+ my ($cobrand) = @_;
+ my $handle;
+ if ($cobrand){
+ $handle = cobrand_handle($cobrand);
+ }
+ if ( !$cobrand || !$handle || !$handle->can('site_title')){
+ return '';
+ } else{
+ return $handle->site_title();
+ }
+}
+
1;
diff --git a/perllib/Cobrands/Emptyhomes/Util.pm b/perllib/Cobrands/Emptyhomes/Util.pm
index 8dbeca4b4..3c02f08f3 100644
--- a/perllib/Cobrands/Emptyhomes/Util.pm
+++ b/perllib/Cobrands/Emptyhomes/Util.pm
@@ -7,7 +7,7 @@
# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved.
# Email: louise@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: Util.pm,v 1.4 2009-09-09 15:29:27 louise Exp $
+# $Id: Util.pm,v 1.5 2009-09-23 17:01:00 louise Exp $
package Cobrands::Emptyhomes::Util;
use Standard;
@@ -84,5 +84,16 @@ sub set_lang_and_domain{
mySociety::Locale::change();
}
+=item site_title
+
+Return the title to be used in page heads
+
+=cut
+
+sub site_title {
+ my ($self) = @_;
+ return _('Report Empty Homes');
+}
+
1;
diff --git a/perllib/Page.pm b/perllib/Page.pm
index b4ca97f3a..ffd8d3945 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Page.pm,v 1.183 2009-09-23 15:43:54 louise Exp $
+# $Id: Page.pm,v 1.184 2009-09-23 17:01:00 louise Exp $
#
package Page;
@@ -184,7 +184,7 @@ sub template_vars ($$){
'alert' => _('Local alerts'),
'faq' => _('Help'),
'about' => _('About us'),
- 'site_title' => _('Report Empty Homes'),
+ 'site_title' => Cobrand::site_title(get_cobrand($q)),
'host' => $host,
'lang_code' => $lang,
'lang' => $lang eq 'en-gb' ? 'Cymraeg' : 'English',