Skip to content

Commit

Permalink
Merge pull request #9 from denisprotassoff/category-display-mode
Browse files Browse the repository at this point in the history
Added display mode for categories
  • Loading branch information
AleksandrsKondratjevs authored Dec 27, 2022
2 parents 1978daf + 0e18056 commit 84b9db5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Model/Resolver/EntityUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ public function resolve(
$storeId = $this->storeManager->getStore()->getId();
$category = $this->categoryRepository->get($id, $storeId);

$result['display_mode'] = $category->getDisplayMode();

if (!$category->getIsActive()) {
return null;
}
Expand Down
1 change: 1 addition & 0 deletions src/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type EntityUrl @doc(description: "EntityUrl is an output object containing the `
sku: String @doc(description: "If URL rewrite is of type PRODUCT - it will return SKU here")
canonical_url: String @doc(description: "The internal relative URL. If the specified url is a redirect, the query returns the redirected URL, not the original.")
type: UrlRewriteEntityTypeEnum @doc(description: "One of PRODUCT, CATEGORY, or CMS_PAGE.")
display_mode: String @doc(description: "One of PRODUCTS, PAGE or PRODUCTS_AND_PAGE")
}

type Query {
Expand Down

0 comments on commit 84b9db5

Please sign in to comment.