Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

wysiwyg-software-design/neos-static-pages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caution

This repository is deprecated and will be removed in September 2025

Neos static pages

A easy way to include a predesigned page into Neos CMS.

Install

composer require wy/neos-static-pages

Usage

Just in assign the Wysiwyg.StaticPages:Mixin.StaticPage to your Neos.Neos:Document and define some static pages in the Settings.yaml. E.g.:

Wysiwyg:
  StaticPages:
    pageGroups:
      default:
        firstPage:
          label: 'First Test Page'
          icon: 'fa-solid fa-bold'
          file: 'ProjectSite/my-prediesigned-page.php'
          dimensionConstraints:
            language: ['de']

Now you can use the page content, stylesheets and scripts in your page with the following Fusion prototypes:

  • Wysiwyg.StaticPages:Content
  • Wysiwyg.StaticPages:Stylesheets
  • Wysiwyg.StaticPages:JavaScripts.Body
  • Wysiwyg.StaticPages:JavaScripts.Head

If you want to use multiple page groups you can configure it like this:

Wysiwyg:
  StaticPages:
    pageGroups:
      default:
        firstPage:
          label: 'First Test Page'
          icon: 'fa-solid fa-bold'
          file: 'ProjectSite/my-prediesigned-page.php'
          dimensionConstraints:
            language: ['de']
      anotherGroup:
        firstPage:
          label: 'Another Test Page'
          icon: 'fa-solid fa-bold'
          file: 'ProjectSite/my-prediesigned-page.php'
          dimensionConstraints:
            language: ['de']

And set the page group to the data source property:

'My.Super:Document':
  extends:
    'Neos.Neos:Document': true
    'Wysiwyg.StaticPages:Mixin': true
  properties:
    staticPage:
      ui:
        inspector:
          editorOptions:
            dataSourceAdditionalData:
              group: 'anotherGroup'

Reference

Config

Wysiwyg:
  StaticPages:
    rootFolder: '%FLOW_PATH_ROOT%' # Root folder for page file lookup
    contentSelector: 'main' # a css selector for extracting the content from the page
    pageGroups:
      default: [] # the default page group for the page select

Eel helpers

Helper Description
StaticPages.Loader.content('group%pageKey') Returns the page content
StaticPages.Loader.stylesheets('group%pageKey') Returns the page stylesheets from the documents head
StaticPages.Loader.headScripts('group%pageKey') Returns the page JavaScripts from the documents head
StaticPages.Loader.bodyScripts('group%pageKey') Returns the page JavaScripts from the documents body

Fusion prototypes

Prototype Description
Wysiwyg.StaticPages:Content Renders the selected page content of the current document
Wysiwyg.StaticPages:Stylesheets Renders the selected page stylesheets of the current document
Wysiwyg.StaticPages:JavaScripts.Body Renders the selected page body JavaScripts of the current document
Wysiwyg.StaticPages:JavaScripts.Head Renders the selected page head JavaScripts of the current document

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages