Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Flynsarmy/wn-contentblocks-plugin
Allow clients to update content blocks directly from the layouts/pages/partials that use them.
https://github.com/Flynsarmy/wn-contentblocks-plugin
Last synced: about 1 month ago
JSON representation
Allow clients to update content blocks directly from the layouts/pages/partials that use them.
- Host: GitHub
- URL: https://github.com/Flynsarmy/wn-contentblocks-plugin
- Owner: Flynsarmy
- License: mit
- Created: 2021-04-17T02:08:26.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-04-18T06:53:33.000Z (over 3 years ago)
- Last Synced: 2024-08-01T19:43:08.940Z (5 months ago)
- Language: PHP
- Size: 132 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-wintercms - Flynsarmy.ContentBlocks - Allow clients to update content blocks directly from the layouts/pages/partials that use them. (Uncategorized / Uncategorized)
README
# Content Blocks
Allow clients to update content blocks directly from the layouts/pages/partials that use them.
![](https://github.com/Flynsarmy/wn-contentblocks-plugin/blob/master/assets/images/marketplace/content-tab.png?raw=true)
## Description
It's cumbersome to go to the *CMS - Content* section, create a content block, get its filename then add the block to your layout/page/partial. Then every time you want to edit the block you need to head back to the *Content* area and find the correct one to update.
With this plugin you can simply reference your content blocks in the markup area and they'll appear in a new *Content* tab right there on the layout/page/partial you're currently working on. Magic!
## Installation
* `git clone` into */plugins/flynsarmy/contentblocks*
## Usage
Simply add a `{% content 'myblock.htm' %}` to your layout/page/partial markup and save. The content block will appear in the *Content* tab.
* HTML, Markdown and Text content blocks are all supported.
* Saving your layout/page/partial will automatically create content blocks that don't already exist.
* If you pass variables to your content blocks, the available variables will be displayed next to that block on the *Content* tab.## Limitations
* You'll need to close/re-open the layout/page/partial tab in CMS area when adding/removing content blocks in the markup section. Just save, close then re-open the tab.
## Future Improvements
* Add CMS permissions to hide all fields clients shouldn't have access to - so they can just go to CMS - Pages - Homepage and only the content blocks will appear for them.