File tree 4 files changed +42
-2
lines changed
Backend/Controller/Adminhtml/Noroute
Catalog/view/frontend/templates/product/view
4 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 8
8
9
9
class Index extends \Magento \Backend \App \Action
10
10
{
11
+ /**
12
+ * Array of actions which can be processed without secret key validation
13
+ *
14
+ * @var string[]
15
+ */
16
+ protected $ _publicActions = ['index ' ];
17
+
11
18
/**
12
19
* @var \Magento\Framework\View\Result\PageFactory
13
20
*/
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ $_attributeLabel = $block->getAtLabel();
22
22
$ _attributeType = $ block ->getAtType ();
23
23
$ _attributeAddAttribute = $ block ->getAddAttribute ();
24
24
25
+ $ renderLabel = true ;
26
+ // if defined as 'none' in layout, do not render
27
+ if ($ _attributeLabel == 'none ' ) {
28
+ $ renderLabel = false ;
29
+ }
30
+
25
31
if ($ _attributeLabel && $ _attributeLabel == 'default ' ) {
26
32
$ _attributeLabel = $ _product ->getResource ()->getAttribute ($ _code )->getStoreLabel ();
27
33
}
@@ -31,10 +37,9 @@ if ($_attributeType && $_attributeType == 'text') {
31
37
$ _attributeValue = $ _helper ->productAttribute ($ _product , $ _product ->$ _call (), $ _code );
32
38
}
33
39
?>
34
-
35
40
<?php if ($ _attributeValue ): ?>
36
41
<div class="product attribute <?= /* @escapeNotVerified */ $ _className ?> ">
37
- <?php if ($ _attributeLabel != ' none ' ): ?> <strong class="type"><?= /* @escapeNotVerified */ $ _attributeLabel ?> </strong><?php endif ; ?>
42
+ <?php if ($ renderLabel ): ?> <strong class="type"><?= /* @escapeNotVerified */ $ _attributeLabel ?> </strong><?php endif ; ?>
38
43
<div class="value" <?= /* @escapeNotVerified */ $ _attributeAddAttribute ?> ><?= /* @escapeNotVerified */ $ _attributeValue ?> </div>
39
44
</div>
40
45
<?php endif ; ?>
Original file line number Diff line number Diff line change @@ -18,6 +18,20 @@ class Collection extends AbstractCollection
18
18
*/
19
19
protected $ _idFieldName = 'block_id ' ;
20
20
21
+ /**
22
+ * Event prefix
23
+ *
24
+ * @var string
25
+ */
26
+ protected $ _eventPrefix = 'cms_block_collection ' ;
27
+
28
+ /**
29
+ * Event object
30
+ *
31
+ * @var string
32
+ */
33
+ protected $ _eventObject = 'block_collection ' ;
34
+
21
35
/**
22
36
* Perform operations after collection load
23
37
*
Original file line number Diff line number Diff line change @@ -25,6 +25,20 @@ class Collection extends AbstractCollection
25
25
*/
26
26
protected $ _previewFlag ;
27
27
28
+ /**
29
+ * Event prefix
30
+ *
31
+ * @var string
32
+ */
33
+ protected $ _eventPrefix = 'cms_page_collection ' ;
34
+
35
+ /**
36
+ * Event object
37
+ *
38
+ * @var string
39
+ */
40
+ protected $ _eventObject = 'page_collection ' ;
41
+
28
42
/**
29
43
* Define resource model
30
44
*
You can’t perform that action at this time.
0 commit comments