Git Product home page Git Product logo

oc-paste-content's Introduction

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.

oc-paste-content's People

Contributors

gergo85 avatar gitlog avatar radist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

oc-paste-content's Issues

problem on MariaDB

MariaDB version 10.4.12-MariaDB

 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax  
   to use near ''' COLLATE utf8mb4_unicode_ci' at line 1 (SQL: ALTER TABLE indikator_paste_block_category CHANGE comment comment VARCHAR(191) DEFAULT ''NULL'' COLLATE utf8mb4_unicod  
  e_ci)  

In PDOConnection.php line 79:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax  
  to use near ''' COLLATE utf8mb4_unicode_ci' at line 1   

In PDOConnection.php line 77:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax  
  to use near ''' COLLATE utf8mb4_unicode_ci' at line 1  

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.