neosrulez/neos-vieweditor

There is no license information available for the latest version (1.0.0) of this package.

An editor to implement a Neos Flow controller view

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:neos-plugin

1.0.0 2022-04-20 16:54 UTC

This package is not auto-updated.

Last update: 2024-12-27 03:44:08 UTC


README

Preview

Installation

The NeosRulez.Neos.ViewEditor package is listed on packagist (https://packagist.org/packages/neosrulez/neos-vieweditor) - therefore you don't have to include the package in your "repositories" entry any more.

Just run:

composer require neosrulez/neos-vieweditor

Configuration

NodeTypes.yaml

'Acme.Site:Document.Page':
  properties:
    foo:
      ui:
        label: View
        inspector:
          group: content
          editor: NeosRulez/Neos/Inspector/Editors/ViewEditor
          editorOptions:
            configuration:
              id: 'fooView'
              route: '/view/foo'

PHP

    /**
     * @return void
     */
    public function indexAction()
    {
        $this->view->assign('foo', 'bar');
        $this->view->assign('randomNumber', rand(5, 10));
    }

Fusion (afx)

Acme.Site.FooController.index = Neos.Fusion:Component {

    renderer = afx`
        <div style="border:1px solid red;padding:10px">
            <button>Test: {foo}</button>
            <p>Random Number: {randomNumber}</p>
            <strong>foo bar</strong>
        </div>
    `
}

Author