-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4fd5ca
commit b46c22e
Showing
9 changed files
with
203 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright (c) Since 2020 PrestaSafe and contributors | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* https://opensource.org/licenses/AFL-3.0 | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to contact@prestasafe.com so we can send you a copy immediately. | ||
* | ||
* @author PrestaSafe <contact@prestasafe.com> | ||
* @copyright Since 2020 PrestaSafe and contributors | ||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) | ||
* International Registered Trademark & Property of PrestaSafe | ||
*/ | ||
|
||
use PrestaSafe\PrettyBlocks\Interfaces\BlockInterface; | ||
|
||
class CategoryDescriptionBlock implements BlockInterface | ||
{ | ||
private $module; | ||
|
||
public function __construct($module) | ||
{ | ||
$this->module = $module; | ||
} | ||
|
||
public function registerBlocks(): array | ||
{ | ||
return [ | ||
'name' => $this->module->l('Category description block'), | ||
'description' => $this->module->l('Render category description in a block'), | ||
'code' => 'prettyblocks_category_description', | ||
'tab' => 'product', | ||
'icon' => 'DocumentTextIcon', | ||
'need_reload' => false, | ||
'insert_default_values' => true, | ||
'templates' => [ | ||
'default' => 'module:' . $this->module->name . '/views/templates/blocks/category/category_description_block.tpl', | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright (c) Since 2020 PrestaSafe and contributors | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* https://opensource.org/licenses/AFL-3.0 | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to contact@prestasafe.com so we can send you a copy immediately. | ||
* | ||
* @author PrestaSafe <contact@prestasafe.com> | ||
* @copyright Since 2020 PrestaSafe and contributors | ||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) | ||
* International Registered Trademark & Property of PrestaSafe | ||
*/ | ||
|
||
use PrestaSafe\PrettyBlocks\Interfaces\BlockInterface; | ||
|
||
class CmsContentBlock implements BlockInterface | ||
{ | ||
private $module; | ||
|
||
public function __construct($module) | ||
{ | ||
$this->module = $module; | ||
} | ||
|
||
public function registerBlocks(): array | ||
{ | ||
return [ | ||
'name' => $this->module->l('Cms content block'), | ||
'description' => $this->module->l('Render CMS description in a block'), | ||
'code' => 'prettyblocks_cms_content', | ||
'tab' => 'product', | ||
'icon' => 'DocumentTextIcon', | ||
'need_reload' => false, | ||
'insert_default_values' => true, | ||
'templates' => [ | ||
'default' => 'module:' . $this->module->name . '/views/templates/blocks/cms/cms_content_block.tpl', | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright (c) Since 2020 PrestaSafe and contributors | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* https://opensource.org/licenses/AFL-3.0 | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to contact@prestasafe.com so we can send you a copy immediately. | ||
* | ||
* @author PrestaSafe <contact@prestasafe.com> | ||
* @copyright Since 2020 PrestaSafe and contributors | ||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) | ||
* International Registered Trademark & Property of PrestaSafe | ||
*/ | ||
|
||
use PrestaSafe\PrettyBlocks\Interfaces\BlockInterface; | ||
|
||
class TinySlider implements BlockInterface | ||
{ | ||
private $module; | ||
|
||
public function __construct($module) | ||
{ | ||
$this->module = $module; | ||
} | ||
|
||
public function registerBlocks(): array | ||
{ | ||
return [ | ||
'name' => $this->module->l('Tiny Slider'), | ||
'description' => $this->module->l('Render a simple and nice slider'), | ||
'code' => 'prettyblocks_tiny_slider', | ||
'tab' => 'sliders', | ||
'icon' => 'RectangleStackIcon', | ||
'need_reload' => false, | ||
'insert_default_values' => true, | ||
'templates' => [ | ||
'default' => 'module:' . $this->module->name . '/views/templates/blocks/tinyslider/default.tpl', | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
views/templates/blocks/category/category_description_block.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{if isset($category) && isset($category.description)} | ||
{$category.description nofilter} | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{if isset($cms) && isset($cms.content)} | ||
{$cms.content nofilter} | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Helloo slider |