Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
Merge branch 'feature/88575' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ofrankowska committed Jun 14, 2022
2 parents 7c33284 + 85c9923 commit 6e0a028
Show file tree
Hide file tree
Showing 17 changed files with 272 additions and 12 deletions.
46 changes: 46 additions & 0 deletions Blackbird_ContentManager/layout/CONTENT_LIST_VIEW_blog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0"?>
<page
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
layout="1column"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<body>
<referenceBlock
name="contentmanager_contentlist"
template="Blackbird_ContentManager::content/view/articles/list.phtml"
>
<block
class="Magento\Framework\View\Element\Template"
name="blog-thumbnail"
template="Magento_Theme::html/picture.phtml"
/>
<block class="Blackbird\ContentManager\Block\Filter" name="blog-filter">
<action method="setFilters">
<argument name="filters" xsi:type="array">
<item name="1" xsi:type="string">cb_article_category</item>
</argument>
</action>
<action method="setCtType">
<argument name="type" xsi:type="string">articles</argument>
</action>
</block>
<block
class="Blackbird\ContentManager\Block\Content\Widget\ContentList"
name="recent-articles"
>
<action method="setCtType">
<argument name="type" xsi:type="string">articles</argument>
</action>
<action method="setOrderField">
<argument name="order_field" xsi:type="string">cb_article_date</argument>
</action>
<action method="setSortOrder">
<argument name="sort_order" xsi:type="string">DESC</argument>
</action>
<action method="setLimitDisplay">
<argument name="limit_display" xsi:type="string">6</argument>
</action>
</block>
</referenceBlock>
</body>
</page>
46 changes: 46 additions & 0 deletions Blackbird_ContentManager/layout/CONTENT_TYPE_VIEW_articles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0"?>
<page
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
layout="1column"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<body>
<referenceBlock
name="contentmanager_view"
template="Blackbird_ContentManager::content/view/articles/view.phtml"
>
<block
class="Magento\Framework\View\Element\Template"
name="article-image"
template="Magento_Theme::html/picture.phtml"
/>
<block class="Blackbird\ContentManager\Block\Filter" name="blog-filter">
<action method="setFilters">
<argument name="filters" xsi:type="array">
<item name="1" xsi:type="string">cb_article_category</item>
</argument>
</action>
<action method="setCtType">
<argument name="type" xsi:type="string">articles</argument>
</action>
</block>
<block
class="Blackbird\ContentManager\Block\Content\Widget\ContentList"
name="recent-articles"
>
<action method="setCtType">
<argument name="type" xsi:type="string">articles</argument>
</action>
<action method="setOrderField">
<argument name="order_field" xsi:type="string">cb_article_date</argument>
</action>
<action method="setSortOrder">
<argument name="sort_order" xsi:type="string">DESC</argument>
</action>
<action method="setLimitDisplay">
<argument name="limit_display" xsi:type="string">6</argument>
</action>
</block>
</referenceBlock>
</body>
</page>
13 changes: 13 additions & 0 deletions Blackbird_ContentManager/layout/catalogsearch_result_index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<page
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
layout="2columns-left"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<body>
<referenceBlock
name="search.content.result"
remove="true"
/>
</body>
</page>
130 changes: 130 additions & 0 deletions Blackbird_ContentManager/layout/cms_index_index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<?xml version="1.0"?>
<page
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<update handle="cms_page_view" />
<body>
<referenceContainer name="content" htmlClass="home">
<!-- Main slider -->
<container
name="section.home.slider"
htmlTag="section"
htmlClass="section section--secondary"
before="-"
>
<container
name="section.home.slider.content"
htmlTag="div"
htmlClass="section__content"
>
<block
class="Blackbird\ContentManager\Block\Content\Widget\ContentList"
name="home-slider"
template="Blackbird_ContentManager::content/view/sliders/list.phtml"
>
<arguments>
<argument name="slider_picture_block" xsi:type="string">homepage-picture</argument>
<argument name="slider_block" xsi:type="string">homepage-slider</argument>
<argument name="lazy" xsi:type="boolean">false</argument>
</arguments>
<action method="setCtType">
<argument name="type" xsi:type="string">sliders</argument>
</action>
<action method="setPager">
<argument name="pager" xsi:type="boolean">false</argument>
</action>
<action method="setLimitDisplay">
<argument name="limit_display" xsi:type="string">1</argument>
</action>
<action method="addAttributeToFilter">
<argument name="attribute" xsi:type="string">cb_slider_id</argument>
<argument name="condition" xsi:type="string">eq</argument>
<argument name="value" xsi:type="string">home-slider</argument>
</action>

<block
class="Magento\Framework\View\Element\Template"
name="homepage-picture"
template="Magento_Theme::html/picture.phtml"
/>

<block
class="Magento\Framework\View\Element\Template"
name="homepage-slider"
template="Magento_Theme::html/slider.phtml"
/>
</block>
</container>
</container>


<!-- Top brands (slider) -->
<container
name="home-brands-section"
htmlTag="section"
htmlClass="section"
before="home-content"
>
<container
name="home-brands-container"
htmlTag="div"
htmlClass="section__content"
>
<block
class="Blackbird\ContentManager\Block\Content\Widget\ContentList"
name="brands-slider"
template="Blackbird_ContentManager::content/view/sliders/list.phtml"
>
<arguments>
<argument name="slider_picture_block" xsi:type="string">brand-picture</argument>
<argument name="slider_block" xsi:type="string">brand-slider</argument>
<argument name="slider_class" xsi:type="string">slider--brands</argument>
<argument
name="slider_title_class"
xsi:type="string"
>
heading heading--first-level margin-0
</argument>
</arguments>
<action method="setCtType">
<argument name="type" xsi:type="string">sliders</argument>
</action>
<action method="setPager">
<argument name="pager" xsi:type="boolean">false</argument>
</action>
<action method="setLimitDisplay">
<argument name="limit_display" xsi:type="string">1</argument>
</action>
<action method="addAttributeToFilter">
<argument name="attribute" xsi:type="string">cb_slider_id</argument>
<argument name="condition" xsi:type="string">eq</argument>
<argument name="value" xsi:type="string">brands-slider</argument>
</action>

<block
class="Magento\Framework\View\Element\Template"
name="brand-picture"
template="Magento_Theme::html/picture.phtml"
/>

<block
class="Magento\Framework\View\Element\Template"
name="brand-slider"
template="Magento_Theme::html/slider.phtml"
>
<arguments>
<argument
name="slider_title_class"
xsi:type="string"
>
heading heading--first-level margin-0
</argument>
</arguments>
</block>
</block>
</container>
</container>
</referenceContainer>
</body>
</page>
10 changes: 10 additions & 0 deletions Blackbird_ContentManager/layout/contentmanager_index_content.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<page
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
layout="1column"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<head>
<remove src="Blackbird_ContentManager::css/content.css"/>
</head>
</page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<page
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
layout="1column"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<head>
<remove src="Blackbird_ContentManager::css/content.css"/>
</head>
</page>
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ $recentArticles = $recentArticlesBlock->getCollection();
<section class="article-item__container row">
<div class="article-item__media col-lg-4">
<a
href="<?= $block->escapeUrl($link) ?>"
class="banner article-item__banner"
href="<?= $block->escapeUrl($link) ?>"
class="banner article-item__banner"
>
<?= $block->getChildHtml('blog-thumbnail', false); ?>
</a>
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ USE GITHUB ISSUE/PULL REQUEST NUMBERS, NOT INTERNAL ONE
### Removed
- unnecessary !important flags (#537)
- elasticsuite footer (#549)
- `Snowdog_Acm` module and moved files to `Blackbird_ContentManager` directory (#555)
- `select2magepack.full.min.js` that doesn't work correctly (select 2 ends up loading twice in magepack bundle and as a separate file), select2 should be removed from magepack config instead (#559)
### Updated
- Magento to 2.4.4 (#546)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Besides modules included in [Alpaca Packages](#alpaca-packages), Alpaca supports
* paradoxlabs/tokenbase
* authorizenet/magento-module-creditcard
* creativestyle/magesuite-magepack
* [snowdog/module-alpaca-acm](https://github.com/SnowdogApps/magento2-alpaca-acm) (Alpaca customisations for paid `blackbird/contentmanager` extension)
* yireo/magento2-webp2

* **Paid:**
Expand Down
8 changes: 7 additions & 1 deletion docs/guide/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ Some JS caused us issues. We had to remove the following lines from the config:
'jquery-ui-modules/effect-fade': 'jquery/ui-modules/effect-fade',
```

## >= 2.26.0
### Snowdog_Acm module
`snowdog/module-alpaca-acm` module is no longer needed.

You can remove it from your project.
If you have overwritten files from `Snowdog_Acm` directory in your child theme, please move them to `Blackbird_ContentManager` and remove `Snowdog_Acm` directory.

## 2.26.0

### Tools
You can use [this helper](https://github.com/SnowdogApps/theme-alpaca-upgrade-helper) to update child theme styles to Alpaca version >= 2.26.0 automatically.
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/working-with-alpaca/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
## Installation
Required modules:
* [Blackbird Advanced Content Manager](https://www.advancedcontentmanager.com/)
* [snowdog/module-alpaca-acm](https://github.com/SnowdogApps/magento2-alpaca-acm)

After modules installation import content types from [Snowdog Alpaca ACM /imports directory](https://github.com/SnowdogApps/magento2-alpaca-acm/tree/master/imports) in `Admin -> Content -> Content Manager -> Content Types -> Import Content Types button`.
After modules installation import content types from [
magento2-alpaca-packages /imports directory](https://github.com/SnowdogApps/magento2-alpaca-packages/tree/master/imports) in `Admin -> Content -> Content Manager -> Content Types -> Import Content Types button`.
## Usage
* Add articles in `Admin -> Content -> Contents -> Articles`
* Blog will be available under [/blog](https://alpaca-community.snowdog.dev/blog)
2 changes: 1 addition & 1 deletion docs/guide/working-with-alpaca/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ To make working with responsive images easier, we've created [picture.phtml](htt
* If images for different screen sizes have different aspect ratios than the default image, add `img_ratio_width_...` and `img_ratio_height_...` attributes.

### Usage in PHTML Templates
Check [list.phtml](https://github.com/SnowdogApps/magento2-alpaca-theme/blob/master/Snowdog_Acm/templates/content/widget/sliders/list.phtml) to see an example of how to use `picture.phtml` inside another template.
Check [list.phtml](https://github.com/SnowdogApps/magento2-alpaca-theme/blob/master/Blackbird_ContentManager/templates/content/widget/sliders/list.phtml) to see an example of how to use `picture.phtml` inside another template.
2 changes: 1 addition & 1 deletion docs/guide/working-with-alpaca/main-content-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@

## Homepage
* To make homepage sections easily customizable, we use [CMS blocks](https://docs.magento.com/user-guide/cms/blocks.html) and [widgets](https://docs.magento.com/user-guide/cms/widgets.html). See default structure [here](https://github.com/SnowdogApps/magento2-alpaca-theme/tree/master/Magento_Cms/layout/cms_index_index.xml).
* Additionally, we use [Blackbird Advanced Content Manager](https://www.advancedcontentmanager.com/) for the slider displayed on top of the homepage and top brands slider. See default structure [here](https://github.com/SnowdogApps/magento2-alpaca-acm/blob/master/view/frontend/layout/cms_index_index.xml).
* Additionally, we use [Blackbird Advanced Content Manager](https://www.advancedcontentmanager.com/) for the slider displayed on top of the homepage and top brands slider. See default structure [here](https://github.com/SnowdogApps/magento2-alpaca-theme/blob/master/Blackbird_ContentManager/layout/cms_index_index.xml).
7 changes: 3 additions & 4 deletions docs/guide/working-with-alpaca/sliders.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,8 @@ Learn about Advanced Content Manager: [Documentation](https://www.advancedconten
### Installation
Required modules:
* [Blackbird Advanced Content Manager](https://www.advancedcontentmanager.com/)
* [snowdog/module-alpaca-acm](https://github.com/SnowdogApps/magento2-alpaca-acm)

After modules installation import content types from [Snowdog Alpaca ACM /imports directory](https://github.com/SnowdogApps/magento2-alpaca-acm/tree/master/imports) in `Admin -> Content -> Content Manager -> Content Types -> Import Content Types button`.
After modules installation import content types from [module-alpaca-packages /imports directory](https://github.com/SnowdogApps/magento2-alpaca-packages/tree/master/imports) in `Admin -> Content -> Content Manager -> Content Types -> Import Content Types button`.
### Usage
1. Add pictures for slider in `Admin -> Content -> Contents -> Pictures`
2. Add slider in `Admin -> Content -> Contents -> Sliders`
Expand All @@ -124,7 +123,7 @@ After modules installation import content types from [Snowdog Alpaca ACM /import
<block
class="Blackbird\ContentManager\Block\Content\Widget\ContentList"
name="my-slider"
template="Snowdog_Acm::content/view/sliders/list.phtml"
template="Blackbird_ContentManager::content/view/sliders/list.phtml"
>
<arguments>
// required argument with uniq name
Expand Down Expand Up @@ -168,4 +167,4 @@ After modules installation import content types from [Snowdog Alpaca ACM /import
/>
</referenceBlock>
```
Check [Home Slider Example](https://github.com/SnowdogApps/magento2-alpaca-acm/blob/master/view/frontend/layout/cms_index_index.xml#L21)
Check [Home Slider Example](https://github.com/SnowdogApps/magento2-alpaca-theme/blob/master/Blackbird_ContentManager/layout/cms_index_index.xml#L21)

0 comments on commit 6e0a028

Please sign in to comment.