Skip to content

Commit

Permalink
change folder names
Browse files Browse the repository at this point in the history
  • Loading branch information
erral committed Dec 30, 2024
1 parent d54d289 commit 476a36b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
12 changes: 6 additions & 6 deletions docs/source/blocks/examples/customschemaandview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down
20 changes: 10 additions & 10 deletions docs/source/blocks/examples/customviewandvariations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -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';
Expand Down

0 comments on commit 476a36b

Please sign in to comment.