Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/friendsofredaxo/mblock
Beliebig viele Datenblöcke innerhalb eines Moduls, per Drag & Drop verschiebbar.
https://github.com/friendsofredaxo/mblock
backend content editing forms hacktoberfest redaxo redaxo-addon repeating repeating-blocks
Last synced: about 1 hour ago
JSON representation
Beliebig viele Datenblöcke innerhalb eines Moduls, per Drag & Drop verschiebbar.
- Host: GitHub
- URL: https://github.com/friendsofredaxo/mblock
- Owner: FriendsOfREDAXO
- License: mit
- Created: 2016-07-29T16:20:31.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-09-08T16:56:30.000Z (5 months ago)
- Last Synced: 2025-01-15T09:57:19.453Z (7 days ago)
- Topics: backend, content, editing, forms, hacktoberfest, redaxo, redaxo-addon, repeating, repeating-blocks
- Language: PHP
- Homepage:
- Size: 670 KB
- Stars: 81
- Watchers: 6
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
MBlock
======Mit MBlock ist es möglich, innerhalb eines Moduls beliebig viele Datenblöcke zu erzeugen. Diese können dann einfach per Button oder Drag & Drop sortiert werden.
_English:_ MBlock lets you create an unlimited number of data blocks within a single module. These data blocks can be sorted per click or drag & drop.
> Please note: The examples are valid for MForm version 7 and higher. When using older MForm versions, please refer to the documentation of the respective version.
![Screenshot](https://raw.githubusercontent.com/FriendsOfREDAXO/mblock/assets/mblock.png)
## Modulbeispiele / Module examples
MBlock enthält einige Modulbeispiele. Diese findest du auf der MBlock-Seite im REDAXO-Backend. An dieser Stelle möchten wir nur zwei Beispiele auflisten — mit Unterstützung durch [MForm](https://github.com/FriendsOfREDAXO/mform) und ohne —, um zu zeigen, wie MBlock funktioniert.
_English:_ MBlock contains several module examples. You’ll find them on the MBlock page within the REDAXO backend. At this point, we want to show two examples only — one with [MForm](https://github.com/FriendsOfREDAXO/mform) support and another one without — to demonstrate how MBlock works.
### Example 1: team members (requires [MForm](https://github.com/FriendsOfREDAXO/mform) addon)
__Input:__
```php
addFieldsetArea('Team member');// textinput
$mform->addTextField("$id.0.name", array('label'=>'Name')); // use string for x.0 json values// media button
$mform->addMediaField(1, array('label'=>'Avatar')); // mblock will auto set the media file as json value// parse form
echo MBlock::show($id, $mform->show(), array('min'=>2,'max'=>4)); // add settings min and max
```__Output:__
```php
';
dump(rex_var::toArray("REX_VALUE[1]"));
echo '';
```### Example 2: team members (without [MForm](https://github.com/FriendsOfREDAXO/mform))
__Input:__
```php
Team member
Name
Avatar
REX_MEDIA[id="1" widget="1"]
EOT;// parse form
echo MBlock::show($id, $form);
```__Output:__
```php
';
dump(rex_var::toArray("REX_VALUE[1]"));
echo '';
```