From 476a36bc48a3685cf5db3db9b05ae5ea78cd6a7f Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Mon, 30 Dec 2024 17:51:29 +0100 Subject: [PATCH] change folder names --- .../blocks/examples/customschemaandview.md | 12 +++++----- .../examples/customviewandvariations.md | 20 ++++++++--------- .../customviewvariationsandschemaenhancer.md | 22 +++++++++---------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/source/blocks/examples/customschemaandview.md b/docs/source/blocks/examples/customschemaandview.md index dc68451f30..7872256465 100644 --- a/docs/source/blocks/examples/customschemaandview.md +++ b/docs/source/blocks/examples/customschemaandview.md @@ -19,11 +19,11 @@ What we need to do is to define the schema, the view component, and configure th In your volto addon, create a folder inside the {file}`components` folder to save all the files required to create a block. -Name this folder as {file}`ExampleBlock`. +Name this folder as {file}`ExampleBlock02`. ## Schema -Create a {file}`Schema.js` file inside the {file}`ExampleBlock` folder, with the following contents: +Create a {file}`Schema.js` file inside the {file}`ExampleBlock02` folder, with the following contents: ```js import messages from './messages'; @@ -60,7 +60,7 @@ export default Schema; As you have noted, we have prepared the block to be internationalized, {term}`internanationalization` (i18n), is the process of creating user interfaces which are suitable for different languages and cultural contexts. -So we need a file {file}`messages.js` in the same {file}`ExampleBlock` folder with the following contents: +So we need a file {file}`messages.js` in the same {file}`ExampleBlock02` folder with the following contents: ```js import { defineMessages } from 'react-intl'; @@ -93,7 +93,7 @@ The view component will have all the required logic to show the information save In our case will be a samll HTML fragment. -Create a file {file}`View.jsx` in the {file}`ExampleBlock` folder with the following contents: +Create a file {file}`View.jsx` in the {file}`ExampleBlock02` folder with the following contents: ```jsx import cx from 'classnames'; @@ -154,8 +154,8 @@ config.blocks.blocksConfig.block02 = { On the top of the file you will need to import the relevant components, as follows: ```js -import View02 from './components/ExampleBlock/View'; -import Schema02 from './components/ExampleBlock/Schema'; +import View02 from './components/ExampleBlock02/View'; +import Schema02 from './components/ExampleBlock02/Schema'; // This is the icon we use for the example, use a meaningful one or provide your own image. import imagesSVG from '@plone/volto/icons/images.svg'; diff --git a/docs/source/blocks/examples/customviewandvariations.md b/docs/source/blocks/examples/customviewandvariations.md index 4663d6793e..20759b4f3c 100644 --- a/docs/source/blocks/examples/customviewandvariations.md +++ b/docs/source/blocks/examples/customviewandvariations.md @@ -19,11 +19,11 @@ What we need to do is to define the schema, the view component, the variations a In your volto addon, create a folder inside the {file}`components` folder to save all the files required to create a block. -Name this folder as {file}`ExampleBlock`. +Name this folder as {file}`ExampleBlock05`. ## Schema -Create a {file}`Schema.js` file inside the {file}`ExampleBlock` folder, with the following contents: +Create a {file}`Schema.js` file inside the {file}`ExampleBlock05` folder, with the following contents: ```js import messages from './messages'; @@ -60,7 +60,7 @@ export default Schema; As you have noted, we have prepared the block to be internationalized, {term}`internanationalization` (i18n), is the process of creating user interfaces which are suitable for different languages and cultural contexts. -So we need a file {file}`messages.js` in the same {file}`ExampleBlock` folder with the following contents: +So we need a file {file}`messages.js` in the same {file}`ExampleBlock05` folder with the following contents: ```js import { defineMessages } from 'react-intl'; @@ -93,7 +93,7 @@ In this case, as we are using variations, the view component needs to use the va This is easily achieved using the `variation` coming on the `props` of the block. -Create a file {file}`View.jsx` in the {file}`ExampleBlock` folder with the following contents: +Create a file {file}`View.jsx` in the {file}`ExampleBlock05` folder with the following contents: ```jsx import withBlockExtensions from '@plone/volto/helpers/Extensions/withBlockExtensions'; @@ -133,7 +133,7 @@ export default withBlockExtensions(View); Now we need to create one or more variations that will be available for this block. -Create a file {file}`VariationView01.jsx` in the {file}`ExampleBlock` folder with the following contents: +Create a file {file}`VariationView01.jsx` in the {file}`ExampleBlock05` folder with the following contents: ```jsx import React from 'react'; @@ -155,7 +155,7 @@ const View = (props) => { export default View; ``` -Create a file {file}`VariationView02.jsx` in the {file}`ExampleBlock` folder with the following contents: +Create a file {file}`VariationView02.jsx` in the {file}`ExampleBlock05` folder with the following contents: ```jsx import React from 'react'; @@ -232,10 +232,10 @@ And before the last `return config;` statement, write the following configuratio On the top of the file you will need to import the relevant components, as follows: ```js -import View05 from './components/ExampleBlock/View'; -import Schema05 from './components/ExampleBlock/Schema'; -import VariationView0501 from './components/ExampleBlock/VariationView01'; -import VariationView0502 from './components/ExampleBlock/VariationView02'; +import View05 from './components/ExampleBlock05/View'; +import Schema05 from './components/ExampleBlock05/Schema'; +import VariationView0501 from './components/ExampleBlock05/VariationView01'; +import VariationView0502 from './components/ExampleBlock05/VariationView02'; // This is the icon we use for the example, use a meaningful one or provide your own image. import imagesSVG from '@plone/volto/icons/images.svg'; diff --git a/docs/source/blocks/examples/customviewvariationsandschemaenhancer.md b/docs/source/blocks/examples/customviewvariationsandschemaenhancer.md index 27dca2925a..cbe0b97b9a 100644 --- a/docs/source/blocks/examples/customviewvariationsandschemaenhancer.md +++ b/docs/source/blocks/examples/customviewvariationsandschemaenhancer.md @@ -21,11 +21,11 @@ What we need to do is to define the schema, the view component, the variations, In your volto addon, create a folder inside the {file}`components` folder to save all the files required to create a block. -Name this folder as {file}`ExampleBlock`. +Name this folder as {file}`ExampleBlock06`. ## Schema -Create a {file}`Schema.js` file inside the {file}`ExampleBlock` folder, with the following contents: +Create a {file}`Schema.js` file inside the {file}`ExampleBlock06` folder, with the following contents: ```js import messages from './messages'; @@ -62,7 +62,7 @@ export default Schema; As you have noted, we have prepared the block to be internationalized, {term}`internanationalization` (i18n), is the process of creating user interfaces which are suitable for different languages and cultural contexts. -So we need a file {file}`messages.js` in the same {file}`ExampleBlock` folder with the following contents: +So we need a file {file}`messages.js` in the same {file}`ExampleBlock06` folder with the following contents: ```js import { defineMessages } from 'react-intl'; @@ -95,7 +95,7 @@ In this case, as we are using variations, the view component needs to use the va This is easily achieved using the `variation` coming on the `props` of the block. -Create a file {file}`View.jsx` in the {file}`ExampleBlock` folder with the following contents: +Create a file {file}`View.jsx` in the {file}`ExampleBlock06` folder with the following contents: ```jsx import withBlockExtensions from '@plone/volto/helpers/Extensions/withBlockExtensions'; @@ -157,7 +157,7 @@ export default schemaEnhancerVariation02; Now we need to create one or more variations that will be available for this block. -Create a file {file}`VariationView01.jsx` in the {file}`ExampleBlock` folder with the following contents: +Create a file {file}`VariationView01.jsx` in the {file}`ExampleBlock06` folder with the following contents: ```jsx import React from 'react'; @@ -179,7 +179,7 @@ const View = (props) => { export default View; ``` -Create a file {file}`VariationView02.jsx` in the {file}`ExampleBlock` folder with the following contents: +Create a file {file}`VariationView02.jsx` in the {file}`ExampleBlock06` folder with the following contents: ```jsx import React from 'react'; @@ -257,11 +257,11 @@ And before the last `return config;` statement, write the following configuratio On the top of the file you will need to import the relevant components, as follows: ```js -import View06 from './components/ExampleBlock/View'; -import Schema06 from './components/ExampleBlock/Schema'; -import VariationView0601 from './components/ExampleBlock/VariationView01'; -import VariationView0602 from './components/ExampleBlock/VariationView02'; -import schemaEnhancerBlock06Variation02 from './components/ExampleBlock/enhancers'; +import View06 from './components/ExampleBlock06/View'; +import Schema06 from './components/ExampleBlock06/Schema'; +import VariationView0601 from './components/ExampleBlock06/VariationView01'; +import VariationView0602 from './components/ExampleBlock06/VariationView02'; +import schemaEnhancerBlock06Variation02 from './components/ExampleBlock06/enhancers'; // This is the icon we use for the example, use a meaningful one or provide your own image. import imagesSVG from '@plone/volto/icons/images.svg';