File tree 5 files changed +31
-13
lines changed
view/frontend/templates/hyva 5 files changed +31
-13
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
[ Unreleased ] : https://github.com/Siteation/magento2-storeinfo/compare/1.0.0...main
11
11
12
+ ## 1.2.0 - 2024-12-28
13
+
14
+ ### Added
15
+ - Option to change title trough xml arguments
16
+ - Option to show title trough xml arguments
17
+
12
18
## 1.1.0 - 2024-12-28
13
19
14
20
### Added
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " siteation/magento2-storeinfo-menus" ,
3
- "version" : " 1.1 .0" ,
3
+ "version" : " 1.2 .0" ,
4
4
"license" : " MIT" ,
5
5
"type" : " magento2-module" ,
6
6
"description" : " Get your store menus with ease" ,
Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ $storeMenus = $viewModels->require(StoreInfoMenus::class);
20
20
21
21
$ menu = $ storeMenus ->getAboutMenu ();
22
22
23
- $ title = $ block ->getTitle () !== null ? $ block ->getTitle () : "About " ;
23
+ $ title = $ block ->getTitle () ?: "About " ;
24
+ $ showTitle = $ block ->getShowTitle () !== null ? $ block ->getShowTitle () : true ;
25
+
24
26
$ classList = $ block ->getClassList () !== null ? $ block ->getClassList () : 'pr-4 lg:w-1/4 md:w-1/2 ' ;
25
27
$ classListTitle = $ block ->getClassListTitle () !== null ? $ block ->getClassListTitle () : 'text-md leading-5 font-semibold tracking-wider uppercase ' ;
26
28
$ classListMenu = $ block ->getClassListMenu () !== null ? $ block ->getClassListMenu () : 'mt-4 space-y-4 ' ;
@@ -36,9 +38,11 @@ if (count($menu) === 0) {
36
38
class="<?= $ escaper ->escapeHtmlAttr ($ classList ) ?> "
37
39
aria-label="<?= $ escaper ->escapeHtml (__ ('%1 Menu ' , $ title )) ?> "
38
40
>
39
- <h2 class="<?= $ escaper ->escapeHtmlAttr ($ classListTitle ) ?> ">
40
- <?= $ escaper ->escapeHtml ($ title ) ?>
41
- </h2>
41
+ <?php if ($ showTitle ): ?>
42
+ <h2 class="<?= $ escaper ->escapeHtmlAttr ($ classListTitle ) ?> ">
43
+ <?= $ escaper ->escapeHtml ($ title ) ?>
44
+ </h2>
45
+ <?php endif ; ?>
42
46
<ul class="<?= $ escaper ->escapeHtmlAttr ($ classListMenu ) ?> ">
43
47
<?php foreach ($ menu as $ item ): ?>
44
48
<li>
Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ $storeMenus = $viewModels->require(StoreInfoMenus::class);
20
20
21
21
$ menu = $ storeMenus ->getLegalMenu ();
22
22
23
- $ title = $ block ->getTitle () !== null ? $ block ->getTitle () : "Legal " ;
23
+ $ title = $ block ->getTitle () ?: "Legal " ;
24
+ $ showTitle = $ block ->getShowTitle () !== null ? $ block ->getShowTitle () : true ;
25
+
24
26
$ classList = $ block ->getClassList () !== null ? $ block ->getClassList () : 'pr-4 lg:w-1/4 md:w-1/2 ' ;
25
27
$ classListTitle = $ block ->getClassListTitle () !== null ? $ block ->getClassListTitle () : 'text-md leading-5 font-semibold tracking-wider uppercase ' ;
26
28
$ classListMenu = $ block ->getClassListMenu () !== null ? $ block ->getClassListMenu () : 'mt-4 space-y-4 ' ;
@@ -36,9 +38,11 @@ if (count($menu) === 0) {
36
38
class="<?= $ escaper ->escapeHtmlAttr ($ classList ) ?> "
37
39
aria-label="<?= $ escaper ->escapeHtml (__ ('%1 Menu ' , $ title )) ?> "
38
40
>
39
- <h2 class="<?= $ escaper ->escapeHtmlAttr ($ classListTitle ) ?> ">
40
- <?= $ escaper ->escapeHtml ($ title ) ?>
41
- </h2>
41
+ <?php if ($ showTitle ): ?>
42
+ <h2 class="<?= $ escaper ->escapeHtmlAttr ($ classListTitle ) ?> ">
43
+ <?= $ escaper ->escapeHtml ($ title ) ?>
44
+ </h2>
45
+ <?php endif ; ?>
42
46
<ul class="<?= $ escaper ->escapeHtmlAttr ($ classListMenu ) ?> ">
43
47
<?php foreach ($ menu as $ item ): ?>
44
48
<li>
Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ $storeMenus = $viewModels->require(StoreInfoMenus::class);
20
20
21
21
$ menu = $ storeMenus ->getServicesMenu ();
22
22
23
- $ title = $ block ->getTitle () !== null ? $ block ->getTitle () : "Services " ;
23
+ $ title = $ block ->getTitle () ?: "Services " ;
24
+ $ showTitle = $ block ->getShowTitle () !== null ? $ block ->getShowTitle () : true ;
25
+
24
26
$ classList = $ block ->getClassList () !== null ? $ block ->getClassList () : 'pr-4 lg:w-1/4 md:w-1/2 ' ;
25
27
$ classListTitle = $ block ->getClassListTitle () !== null ? $ block ->getClassListTitle () : 'text-md leading-5 font-semibold tracking-wider uppercase ' ;
26
28
$ classListMenu = $ block ->getClassListMenu () !== null ? $ block ->getClassListMenu () : 'mt-4 space-y-4 ' ;
@@ -36,9 +38,11 @@ if (count($menu) === 0) {
36
38
class="<?= $ escaper ->escapeHtmlAttr ($ classList ) ?> "
37
39
aria-label="<?= $ escaper ->escapeHtml (__ ('%1 Menu ' , $ title )) ?> "
38
40
>
39
- <h2 class="<?= $ escaper ->escapeHtmlAttr ($ classListTitle ) ?> ">
40
- <?= $ escaper ->escapeHtml ($ title ) ?>
41
- </h2>
41
+ <?php if ($ showTitle ): ?>
42
+ <h2 class="<?= $ escaper ->escapeHtmlAttr ($ classListTitle ) ?> ">
43
+ <?= $ escaper ->escapeHtml ($ title ) ?>
44
+ </h2>
45
+ <?php endif ; ?>
42
46
<ul class="<?= $ escaper ->escapeHtmlAttr ($ classListMenu ) ?> ">
43
47
<?php foreach ($ menu as $ item ): ?>
44
48
<li>
You can’t perform that action at this time.
0 commit comments