Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
page_title
Commits
4bf5e734
Commit
4bf5e734
authored
May 20, 2009
by
Nicholas Thompson
Browse files
Addition to allow for Pager pattern title appending (eg, add Page 1, 2, 3 onto Views Listings)
parent
988b636b
Changes
2
Hide whitespace changes
Inline
Side-by-side
page_title.admin.inc
View file @
4bf5e734
...
...
@@ -96,6 +96,13 @@ function page_title_admin_settings() {
}
$form
[
'page_title_pager_pattern'
]
=
array
(
'#type'
=>
'textfield'
,
'#title'
=>
t
(
'Pattern for pages that contain a pager'
),
'#default_value'
=>
variable_get
(
'page_title_pager_pattern'
,
''
),
'#description'
=>
t
(
'This pattern will be appended to a page title for any given page with a pager on it'
),
);
// Add the token help to a collapsed fieldset at the end of the configuration page.
$form
[
'token_help'
]
=
array
(
'#type'
=>
'fieldset'
,
...
...
page_title.module
View file @
4bf5e734
...
...
@@ -349,6 +349,10 @@ function page_title_page_get_title() {
$page_title_pattern
=
variable_get
(
'page_title_default'
,
'[page-title] | [site-slogan]'
);
}
// Append the pattern for pages with a pager on them
$page_title_pattern
.
=
isset
(
$_REQUEST
[
'page'
])
?
variable_get
(
'page_title_pager_pattern'
,
''
)
:
''
;
// Applu the token patterns using the one-level replacer (frontpage is only "global" scope)
$title
=
token_replace
(
$page_title_pattern
);
}
// Otherwise this is a non-frontpage page title.
...
...
@@ -379,6 +383,9 @@ function page_title_page_get_title() {
$page_title_pattern
=
variable_get
(
'page_title_default'
,
'[page-title] | [site-name]'
);
}
// Append the pattern for pages with a pager on them
$page_title_pattern
.
=
isset
(
$_REQUEST
[
'page'
])
?
variable_get
(
'page_title_pager_pattern'
,
''
)
:
''
;
// Apply token patterns using token_replace_multiple
$title
=
token_replace_multiple
(
$page_title_pattern
,
$types
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment