File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,22 @@ protected function _prepareLayout()
8888 /** @return DataObject */
8989 public function getCategory ()
9090 {
91+ if ($ this ->getData ('category ' )) {
92+ return $ this ->getData ('category ' );
93+ }
9194 return $ this ->registry ->registry ('current_category ' );
9295 }
9396
97+ /**
98+ * @param $category
99+ *
100+ * @return $this
101+ */
102+ public function setCategory ($ category ) {
103+ $ this ->setData ('category ' , $ category );
104+ return $ this ;
105+ }
106+
94107 public function getPosts ()
95108 {
96109 if (!$ this ->posts ) {
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
22<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Module/etc/module.xsd" >
3- <module name =" Skywire_WordpressApi" setup_version =" 1.7.1 " >
3+ <module name =" Skywire_WordpressApi" setup_version =" 1.7.2 " >
44 </module >
55</config >
You can’t perform that action at this time.
0 commit comments