Giter VIP home page Giter VIP logo

craft-richvariables's Introduction

Scrutinizer Code Quality Code Coverage Build Status Code Intelligence Status

Rich Variables plugin for Craft CMS 3.x

Allows you to easily use Craft Globals as variables in Rich Text fields

Screenshot

Related: Rich Variables for Craft 2.x

Note: The license fee for this plugin is $19.00 via the Craft Plugin Store.

Requirements

This plugin requires Craft CMS 3.0.0 or later.

Installation

To install Rich Variables, follow these steps:

  1. Install with Composer via composer require nystudio107/craft-richvariables from your project directory
  2. Install the plugin via ./craft install/plugin rich-variables via the CLI, or in the Control Panel, go to Settings → Plugins and click the “Install” button for Rich Variables.

You can also install Rich Variables via the Plugin Store in the Craft Control Panel.

Rich Variables works on Craft 3.x

Documentation

Click here -> Rich Variables Documentation

Rich Variables Roadmap

Some things to do, and ideas for potential features:

  • Rich Variables could potentially have different Global sets for different Channels
  • We could allow for things other than Global sets to be available for insertion, such as Entry values, Categories, etc.

Brought to you by nystudio107

craft-richvariables's People

Contributors

brandonkelly avatar khalwat avatar makeilalundy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

craft-richvariables's Issues

Setting variable values as the result of a GraphQL or rest query

Is there an optimized method for updating variables as the result of a GraphQL or Rest query? I could see a way to do this using cron and a shell script, but it seems like there is probably a better way.

A rough example use case, the Census rest API provides population estimates. It would be helpful for those variables to automatically update based on Census updates on a page that shows the population for a state along with some other data points.

Version 1.0.30 seems broken

When running a site with the latest version of the plugin, I get the following error:

Not instantiable – yii\di\NotInstantiableException
Failed to instantiate component or class "nystudio107\pluginvite\services\VitePluginService".
↵
Caused by: ReflectionException
Class nystudio107\pluginvite\services\VitePluginService does not exist

in /var/www/html/craft/vendor/yiisoft/yii2/di/Container.php at line 507

If I downgrade to 1.0.29, it works fine.

image

Textual toolbar button

I wish the Rich Variables button was more consistent with all the other Redactor toolbar buttons which are text only and b/w.

Calling unknown method: craft\models\FieldLayout::getFields()

Hi,

I'm running Craft CMS 4.2.0.2 with Rich Variables 4.0.0-beta.3 and Redactor 3.0.2.

Redactor fields won't load in CP.

I'm receiving a JS error "Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 5 of the JSON data"

The action being called is: 'actions/rich-variables&site=default' - Which returns a 500 error due to PHP error "Calling unknown method: craft\models\FieldLayout::getFields()".

Looks like on controllers/DefaultController.php on line 76, the plugin is using:

$fieldLayoutFields = $layout->getFields();

I think it should be

$fieldLayoutFields = $layout->getCustomFields();

Composer requirements issue with Craft 4/Redactor

Describe the bug

I can't install the version 4 beta due to an issue with composer requirements

To reproduce

Steps to reproduce the behaviour:

  1. Set composer "minimum-stability": "beta"
  2. Run composer require nystudio107/craft-richvariables:^4.0.0-beta.2
  3. Get the following error:

Please note, by the way, that I believe Redactor 3 is now in beta

Problem 1
    - Root composer.json requires nystudio107/craft-richvariables ^4.0.0-beta.2 -> satisfiable by nystudio107/craft-richvariables[4.0.0-beta.2].
    - nystudio107/craft-richvariables 4.0.0-beta.2 requires craftcms/redactor 3.0.x-dev as 2.8.8 -> found craftcms/redactor[3.0.x-dev] but it does not match your minimum-stability.

Expected behaviour

Composer installs the package ;-)

Versions

  • Plugin version: 4.0.0-beta.2
  • Craft version: 4.0.0-beta.3

Rich Variables in plain text fields

We use Rich Variables in some projects, now I get the question again and again, if it would be possible to use the variables in text fields, which are not redactor fields, but in plain text fields.

I would find this a good addition

Richvariables for Plaintext Fields

I'd link to use the Plugin for variables i use in a plaintext field. If i add {globalset:8874:currentYear}to the plaintext i get the output {globalset:8874:currentYear}.

Is it planed to add this one?

[FR] CKEditor support

Is your feature request related to a problem? Please describe.

With Craft CMS transitioning from Redactor to CKEditor, the Rich Variables plugin lacks integration with CKEditor, hindering users from inserting variables directly into their content using the new editor.

Describe the solution you would like

I'd like the Rich Variables plugin to be updated to support CKEditor, so users can easily insert variables as they currently do with Redactor.

RC1 - Plugin "richvariables" not found

When using the plugin with RC1, Redactor throws an error that the plugin "richvariables" is not found (the one you configure in your .json config.

Might be because of the changes in how Redactor is now a plug-in instead of in core.

Not loading in Redactor

Describe the bug

Quite simply, the Rich Variables icon won't appear in Redactor

To reproduce

Steps to reproduce the behaviour:

  1. Install plugin
  2. Add plugin to Redactor config
  3. Plugin does not appear
  4. Console shows the following error:
Failed to load resource: the server responded with a status of 500 ()
init @ richvariables.js:69

Redactor config:

{
  "buttons": ["html","bold", "italic"],
  "plugins": ["richvariables"]
}

Expected behaviour

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Versions

  • Plugin version: 4.0.0-beta.3
  • Craft version: Craft Pro 4.0.3

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.