Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The listing of template files on the Theme Information overlay has always been rather cluttered. Please see my before and after screen shots attached.
I added the following code to the end of function "format_themes" in the file "views_plugin_display.inc" as a quick work around for the problem.
Perhaps someone could come up with a better solution. -- Patrick
// return implode(', ', array_reverse($fixed));
$item_arr = array_reverse( $fixed );
$num_cols = 2;
$tmp_list_str = "<br>\n";
$tmp_list_str .= sprintf( "<div class=\"%s\">\n", "views-template-list-wrapper" );
$tmp_list_str .= sprintf( "<table class=\"%s\">\n", "views-template-list-table" );
$ii=0;
foreach( $item_arr as $item_key => $item_val )
{
if( ($ii % $num_cols) == 0 )
$tmp_list_str .= "<tr>\n";
$tmp_list_str .= sprintf( "<td width=\"48%%\">%s</td>", $item_val );
if( ($ii % $num_cols) == 1 )
$tmp_list_str .= "</tr>\n";
$ii++;
}
$tmp_list_str .= "</table>\n";
$tmp_list_str .= "</div>\n";
$tmp_list_str .= "<br>\n";
return $tmp_list_str;
}
Comment | File | Size | Author |
---|---|---|---|
Views_Templates_After.png | 144.04 KB | pmol123 | |
Views_Templates_Before.png | 129.5 KB | pmol123 |
Comments
Comment #1
pmol123 CreditAttribution: pmol123 commentedThis is a very simple fix to Drupal 7 Views Theme/Theming Templates/Pages
Patrick
Comment #2
pmol123 CreditAttribution: pmol123 commentedComment #3
pmol123 CreditAttribution: pmol123 commented