File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
app/code/Magento/Catalog/Controller/Category Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -172,13 +172,15 @@ public function execute()
172
172
if ($ settings ->getPageLayout ()) {
173
173
$ page ->getConfig ()->setPageLayout ($ settings ->getPageLayout ());
174
174
}
175
+
176
+ $ hasChildren = $ category ->hasChildren ();
175
177
if ($ category ->getIsAnchor ()) {
176
- $ type = $ category -> hasChildren () ? 'layered ' : 'layered_without_children ' ;
178
+ $ type = $ hasChildren ? 'layered ' : 'layered_without_children ' ;
177
179
} else {
178
- $ type = $ category -> hasChildren () ? 'default ' : 'default_without_children ' ;
180
+ $ type = $ hasChildren ? 'default ' : 'default_without_children ' ;
179
181
}
180
182
181
- if (!$ category -> hasChildren () ) {
183
+ if (!$ hasChildren ) {
182
184
// Two levels removed from parent. Need to add default page type.
183
185
$ parentType = strtok ($ type , '_ ' );
184
186
$ page ->addPageLayoutHandles (['type ' => $ parentType ]);
You can’t perform that action at this time.
0 commit comments