-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #535 from BitBagCommerce/feature/OP-328
OP-328: Docs
- Loading branch information
Showing
15 changed files
with
80 additions
and
140 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
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,21 @@ | ||
# Content Templates | ||
|
||
Content Templates are a way to define the structure of content elements, which can be used in blocks and pages. | ||
|
||
![Content Templates usage](content_templates.gif) | ||
|
||
## General usage | ||
|
||
Let's assume you want to create a content template for a blog post. | ||
You want to add following content elements: | ||
- **Title** (textarea) | ||
- **Subtitle** (textarea) | ||
- **Image** (single media) | ||
- **Content** (textarea) | ||
- **Author** (textarea) | ||
- **Products carousel** (products carousel by taxon) | ||
|
||
Then, when you create a page, in the content elements section you can choose the content template you created. | ||
It will create a form with fields you defined in the template. \ | ||
Your job is just to fill them with content. \ | ||
Of course, you can add additional content elements to the form, after you choose the template. It's super flexible! |
File renamed without changes
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,21 +1,24 @@ | ||
# Templates | ||
# Page/Block Templates | ||
|
||
Templates are a way to define the structure of content elements, which can be used in blocks and pages. | ||
|
||
![Templates usage](templates.gif) | ||
Templates allow you to define and select the layout of your pages and blocks. | ||
|
||
## General usage | ||
|
||
Let's assume you want to create a template for a blog post. | ||
You want to add following content elements: | ||
- **Title** (textarea) | ||
- **Subtitle** (textarea) | ||
- **Image** (single media) | ||
- **Content** (textarea) | ||
- **Author** (textarea) | ||
- **Products carousel** (products carousel by taxon) | ||
By default, the blocks and pages have its own templates. You can create your own templates and use it in specific blocks or pages. | ||
|
||
### Creating a new template | ||
|
||
Then, when you create a page, in the content elements section you can choose the template you created. | ||
It will create a form with fields you defined in the template. \ | ||
Your job is just to fill them with content. \ | ||
Of course, you can add additional content elements to the form, after you choose the template. It's super flexible! | ||
1. Go to the `config/packages/cms_plugin.yaml` file. | ||
2. Define your templates in following format: | ||
```yaml | ||
sylius_cms: | ||
templates: | ||
pages: | ||
- "@SyliusCMSPlugin/Shop/MyPage/template.twig" | ||
- "@SyliusCMSPlugin/Shop/MySecondPage/template.twig" | ||
blocks: | ||
- "@SyliusCMSPlugin/Shop/MyPage/template.twig" | ||
- "@SyliusCMSPlugin/Shop/MySecondPage/template.twig | ||
``` | ||
3. Create a new template file. For example, `templates/bundles/SyliusCMSPlugin/Shop/MyPage/template.twig`. | ||
4. Go to the Block/Page form and select your template from the list. |
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,20 @@ | ||
# Content Templates | ||
|
||
In this plugin, content templates are responsible for defining the structure of content elements, which can be used in blocks and pages. | ||
|
||
## The process of creating a Content Template | ||
|
||
By following these steps below, administrators can easily add and manage content templates. | ||
|
||
1. Please access the administrator panel of the Sylius e-commerce system. | ||
2. Navigate to the CMS section or the designated area for managing content templates. | ||
3. Select the option to create a new content template item. | ||
4. Fill in the required fields in the content template creation form, such as the name and type. | ||
5. Add some content elements. | ||
6. Save the content template item after filling in the necessary details. | ||
7. Repeat the process to add additional content template items, as needed. | ||
8. Now you can use content templates in blocks and pages. | ||
|
||
The mentioned form: | ||
|
||
![Screenshot showing content template creation form in admin](content_template_create_cms.png) |
This file was deleted.
Oops, something went wrong.