Skip to content

Paste simple content (snippets) or HTML blocks to the CMS or plugins. This is an October CMS and Winter CMS plugin.

License

Notifications You must be signed in to change notification settings

gergo85/oc-paste-content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paste Content plugin

Use this plugin if you want to paste own predetermined simple content (snippets) or HTML blocks to the CMS or plugins.

Advantages

  • It works with build-in CMS (Pages, Partials and Layout).
  • It works with any plugins (News & Newsletter, Content Plus, etc.).
  • Support multilanguage content Works with Rainlab Translate plugin.
  • Easy to paste snippets with the build-in WYSIWYG editor.

Works with CMS

Usage steps

  1. Add a new content on the Paste Content page.
  2. Use the paste Twig function.
  3. Add the type and code of content.

Example

Predetermined content

Code: ads

Text: ADVERTISEMENT HERE

HTML code

<p>Lorem ipsum dolor sit amet, nibh aute et sodales at arcu, urna libero, euismod pharetra vestibulum tristique praesent. Ligula integer natoque ut praesent sapien, ligula placerat nisl neque id commodi, quis dictum sit erat ante mollis nascetur.</p>

{{ paste('text', 'ads') }}

The result

Lorem ipsum dolor sit amet, nibh aute et sodales at arcu, urna libero, euismod pharetra vestibulum tristique praesent. Ligula integer natoque ut praesent sapien, ligula placerat nisl neque id commodi, quis dictum sit erat ante mollis nascetur.

ADVERTISEMENT HERE

Twig function options

Name Description
First parameter The type of content: text or code
Second parameter The code of content or the ID of content

Works with plugins

Usage steps

  1. Add a new content on the Paste Content page.
  2. Paste the code of content to the blog post or other text.
  3. Use the paste Twig filter on the front-end pages.

Example

Predetermined content

Code: ads

Text: ADVERTISEMENT HERE

Blog post

Lorem ipsum dolor sit amet, nibh aute et sodales at arcu, urna libero, euismod pharetra vestibulum tristique praesent. Ligula integer natoque ut praesent sapien, ligula placerat nisl neque id commodi, quis dictum sit erat ante mollis nascetur.

{{ ads }}

HTML code

{{ post.content_html|paste }}

The result

Lorem ipsum dolor sit amet, nibh aute et sodales at arcu, urna libero, euismod pharetra vestibulum tristique praesent. Ligula integer natoque ut praesent sapien, ligula placerat nisl neque id commodi, quis dictum sit erat ante mollis nascetur.

ADVERTISEMENT HERE

Available languages

  • en - English
  • hu - Magyar

Installation

  1. Go to the Settings > Updates & Plugins page in the Backend.
  2. Click on the Install plugins button.
  3. Type the Paste Content text in the search field.

About

Paste simple content (snippets) or HTML blocks to the CMS or plugins. This is an October CMS and Winter CMS plugin.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published