Active
Project:
Web Links
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Jan 2011 at 14:52 UTC
Updated:
13 Feb 2015 at 12:01 UTC
Jump to comment: Most recent
The title of the page is the same for all weblinks/% pages.
I added the following in weblinks_init() in order to get a title that takes the term into account.
if (arg(0) == 'weblinks') {
...
if( !is_null(arg(1)) && is_numeric(arg(1)) ) {
// in a webliks/% url
$term = taxonomy_get_term(arg(1));
if( !is_null($term) ){
drupal_set_title(drupal_get_title().': '.$term->name);
}
}
}
An option to generate a title with custom format would be nice.
By the way, I believe that in the same function:
if ($item['path'] == 'weblinks') {
should be written
if ($item['link_path'] == 'weblinks') {
Cheers,
Comments
Comment #1
jonathan1055 commentedThis is still an issue for 7.x When browsing any weblinks group /weblinks/x or /weblinks/unpublished, /weblinks/recent or /weblinks/popular the page title in browser tab and on screen is the text set by editing the main menu. This could be improved I am sure.
The current D7 code is:
We could implement the suggestion from mdoubez, or something similar. I note that the 'path' to 'link_path' change has been done, but I have not confirmed which is correct.
Jonathan