From 6498dce2cbcc43eed8735e8c9954afef99c26725 Mon Sep 17 00:00:00 2001 From: zero-24 Date: Sun, 3 Sep 2017 23:57:51 +0200 Subject: [PATCH 1/3] some clean up and rewrite --- modules/mod_menu/tmpl/default.php | 126 +++++++------------- modules/mod_menu/tmpl/default_heading.php | 4 +- modules/mod_menu/tmpl/default_separator.php | 4 +- modules/mod_random_image/tmpl/default.php | 17 +-- modules/mod_related_items/tmpl/default.php | 18 +-- 5 files changed, 73 insertions(+), 96 deletions(-) diff --git a/modules/mod_menu/tmpl/default.php b/modules/mod_menu/tmpl/default.php index 52066b326d2a6..0dbfd92f78ffc 100644 --- a/modules/mod_menu/tmpl/default.php +++ b/modules/mod_menu/tmpl/default.php @@ -19,83 +19,49 @@ // The menu class is deprecated. Use nav instead ?> + &$item) : ?> + id; ?> + id == $default_id) : ?> + + + id == $active_id || ($item->type === 'alias' && $item->params->get('aliasoptions') == $active_id)) : ?> + + + id, $path)) : ?> + + type === 'alias') : ?> + params->get('aliasoptions'); ?> + 0 && $aliasToId == $path[count($path) - 1]) : ?> + + + + + + type === 'separator') : ?> + + + deeper) : ?> + + + parent) : ?> + + +
  • + type, array('separator', 'component', 'heading', 'url'))) : ?> + type); ?> + + + + + deeper) : ?> + '; ?> + shallower) : ?> + + '; ?> +
  • ', $item->level_diff); ?> + + + '; ?> + + + diff --git a/modules/mod_menu/tmpl/default_heading.php b/modules/mod_menu/tmpl/default_heading.php index 5612c40bfd54f..805436c336ce1 100644 --- a/modules/mod_menu/tmpl/default_heading.php +++ b/modules/mod_menu/tmpl/default_heading.php @@ -33,4 +33,6 @@ } ?> -> +> + + diff --git a/modules/mod_menu/tmpl/default_separator.php b/modules/mod_menu/tmpl/default_separator.php index eca36cce382db..997e4849f121f 100644 --- a/modules/mod_menu/tmpl/default_separator.php +++ b/modules/mod_menu/tmpl/default_separator.php @@ -33,4 +33,6 @@ } ?> -> +> + + diff --git a/modules/mod_random_image/tmpl/default.php b/modules/mod_random_image/tmpl/default.php index d1caddec2f1b1..f38347f9491b6 100644 --- a/modules/mod_random_image/tmpl/default.php +++ b/modules/mod_random_image/tmpl/default.php @@ -8,13 +8,16 @@ */ defined('_JEXEC') or die; + +$image = JHtml::_('image', $image->folder . '/' . $image->name, $image->name, array('width' => $image->width, 'height' => $image->height)); + ?>
    - - - - folder . '/' . $image->name, $image->name, array('width' => $image->width, 'height' => $image->height)); ?> - - - + + + + + + +
    diff --git a/modules/mod_related_items/tmpl/default.php b/modules/mod_related_items/tmpl/default.php index fdbc7ac573538..868d804d2afaf 100644 --- a/modules/mod_related_items/tmpl/default.php +++ b/modules/mod_related_items/tmpl/default.php @@ -8,13 +8,17 @@ */ defined('_JEXEC') or die; + ?> From 2dcbfa89d90fced14d58212f66d4fdfc92c70ef0 Mon Sep 17 00:00:00 2001 From: zero-24 Date: Mon, 4 Sep 2017 21:27:45 +0200 Subject: [PATCH 2/3] thanks @quy --- modules/mod_menu/tmpl/default.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/mod_menu/tmpl/default.php b/modules/mod_menu/tmpl/default.php index 0dbfd92f78ffc..3ca716e55d3b8 100644 --- a/modules/mod_menu/tmpl/default.php +++ b/modules/mod_menu/tmpl/default.php @@ -54,14 +54,14 @@ deeper) : ?> - '; ?> + From 90aef02dbc819e4bb7ce1dd178889848d4061ae6 Mon Sep 17 00:00:00 2001 From: Quy Date: Tue, 5 Sep 2017 10:07:58 -0700 Subject: [PATCH 3/3] Remove space (#31) --- modules/mod_menu/tmpl/default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mod_menu/tmpl/default.php b/modules/mod_menu/tmpl/default.php index 3ca716e55d3b8..bd467d2d856b3 100644 --- a/modules/mod_menu/tmpl/default.php +++ b/modules/mod_menu/tmpl/default.php @@ -46,7 +46,7 @@ parent) : ?> -
  • +
  • type, array('separator', 'component', 'heading', 'url'))) : ?> type); ?>