- Patch #22215 by Richard Archer: refactored primary and secondary links.
Deprecates the primary_links module. This patch was much needed. Thanks Richards! NOTE: if some themers could investigate if there is room for improvement with regard to theming, that would be awesome.4.7.x
parent
ea53aad7c8
commit
1c4cc97225
|
@ -130,9 +130,7 @@ function phptemplate_features() {
|
|||
'toggle_mission',
|
||||
'toggle_name',
|
||||
'toggle_node_user_picture',
|
||||
'toggle_primary_links',
|
||||
'toggle_search',
|
||||
'toggle_secondary_links',
|
||||
'toggle_slogan'
|
||||
);
|
||||
}
|
||||
|
@ -200,9 +198,9 @@ function phptemplate_page($content) {
|
|||
'messages' => theme('status_messages'),
|
||||
'mission' => isset($mission) ? $mission : '',
|
||||
'onload_attributes' => theme('onload_attribute'),
|
||||
'primary_links' => theme_get_setting('primary_links'),
|
||||
'primary_links' => menu_primary_links(),
|
||||
'search_box' => (theme_get_setting('toggle_search') ? search_box() : ''),
|
||||
'secondary_links' => theme_get_setting('secondary_links'),
|
||||
'secondary_links' => menu_secondary_links(),
|
||||
'sidebar_left' => $sidebar_left,
|
||||
'sidebar_right' => $sidebar_right,
|
||||
'site_name' => (theme_get_setting('toggle_name') ? variable_get('site_name', 'Drupal') : ''),
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</td>
|
||||
|
||||
<td class="primary-links" width="70%" align="center" valign="middle">
|
||||
<?php print theme('links', $primary_links) ?>
|
||||
<?php print theme('menu_links', $primary_links) ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -42,7 +42,7 @@
|
|||
<table id="secondary-menu" summary="Navigation elements." border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="secondary-links" width="75%" align="center" valign="middle">
|
||||
<?php print theme('links', $secondary_links) ?>
|
||||
<?php print theme('menu_links', $secondary_links) ?>
|
||||
</td>
|
||||
<td width="25%" align="center" valign="middle">
|
||||
<?php print $search_box ?>
|
||||
|
@ -104,16 +104,12 @@
|
|||
<td align="center" valign="middle">
|
||||
<?php if (is_array($primary_links)) : ?>
|
||||
<div class="primary-links">
|
||||
<?php foreach ($primary_links as $link): ?>
|
||||
<?php print $link?> |
|
||||
<?php endforeach; ?>
|
||||
<?php print theme('menu_links', $primary_links) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (is_array($secondary_links)) : ?>
|
||||
<div class="secondary-links">
|
||||
<?php foreach ($secondary_links as $link): ?>
|
||||
<?php print $link?> |
|
||||
<?php endforeach; ?>
|
||||
<?php print theme('menu_links', $secondary_links) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue