Maintainers
Pricing
Enterprise
More
More
Documentation
Try Live
Rankings
Install
Blog
Docs7
Ask
New
Add Docs
Neos CMS
https://neos.readthedocs.io/en/8.3/
Admin
Neos is a free enterprise web content management system licensed under the GPL.
Tokens:
404,115
Snippets:
2,678
Trust Score:
8.3
Update:
1 day ago
Context
Chat
Benchmark
53.38
Latest
Show doc for...
Code
Info
Show Results
Tokens:
Raw
Copy
Link
Tokens:
Raw
Copy
Link
### Install Sphinx with easy_install Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/Documentation.html Alternative installation method using easy_install to get the latest Sphinx version. ```bash easy_install -U Sphinx ``` -------------------------------- ### Neos.Neos:ImageUri example Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Gets a URI to a (thumbnail) image for an asset. The example sets width, height, and allows cropping and upscaling. ```fusion logoUri = Neos.Neos:ImageUri { asset = ${q(node).property('image')} width = 100 height = 100 allowCropping = TRUE allowUpScaling = TRUE } ``` -------------------------------- ### Date.create examples Source: https://neos.readthedocs.io/en/8.3/References/EelHelpersReference.html Examples of creating a date object using the Date.create helper with a date string and a relative format. ```eel Date.create('2018-12-04') Date.create('first day of next year') ``` -------------------------------- ### Date.now example Source: https://neos.readthedocs.io/en/8.3/References/EelHelpersReference.html Example of getting the current date and time as a timestamp using the Date.now helper. ```eel Date.now().timestamp ``` -------------------------------- ### Install project dependencies Source: https://neos.readthedocs.io/en/8.3/Contribute/Code/EmberUI.html Run npm install, bundle install, and bower install before running grunt tasks. ```bash npm install ``` ```bash bundle install --binstubs --path bundle ``` ```bash bower install ``` -------------------------------- ### Install sass and compass Source: https://neos.readthedocs.io/en/8.3/Contribute/Code/EmberUI.html Install sass and compass using gem. Required for compiling SCSS sources. ```bash sudo gem install sass compass ``` -------------------------------- ### Neos.Neos:NodeUri example Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Builds a URI to a node. The example uses the node's parent as the target node. ```fusion nodeLink = Neos.Neos:NodeUri { node = ${q(node).parent().get(0)} } ``` -------------------------------- ### f:switch usage example Source: https://neos.readthedocs.io/en/8.3/References/ViewHelpers/TYPO3Fluid.html Example of using the f:switch ViewHelper to render content based on a value or expression, with an optional default case. The source does not provide a concrete code example, only a reference to a partial rendering alternative. ```html <f:render partial="title.{person.gender}" /> ``` -------------------------------- ### Neos.Backend.interfaceLanguage() usage example Source: https://neos.readthedocs.io/en/8.3/References/EelHelpersReference.html Example of using the Neos.Backend.interfaceLanguage() helper to get the interface language for translations. ```fusion Translation.id("mh").locale(Neos.Backend.interfaceLanguage()).translate() ``` -------------------------------- ### Run make livehtml for documentation preview Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/BeginnersGuide.html Starts a live-reloading Sphinx server for the Neos documentation. Expected output shows the serving URL. ```bash make livehtml ``` -------------------------------- ### Configuration.setting usage examples Source: https://neos.readthedocs.io/en/8.3/References/EelHelpersReference.html Two examples showing how to use the Configuration.setting Eel helper to retrieve configuration settings. The first checks the Flow core context, the second retrieves a custom setting. ```eel Configuration.setting('Neos.Flow.core.context') == 'Production' ``` ```eel Configuration.setting('Acme.Demo.speedMode') == 'light speed' ``` -------------------------------- ### Change to documentation directory Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/Documentation.html Navigate to the Neos.Neos/Documentation directory where the Makefile is located. ```bash cd Neos.Neos/Documentation ``` -------------------------------- ### String.startsWith example Source: https://neos.readthedocs.io/en/8.3/References/EelHelpersReference.html Tests if a string starts with a given search string. The optional position parameter sets the starting index for the test. ```eel String.startsWith('Hello world!', 'Hello') == true String.startsWith('My hovercraft is full of...', 'Hello') == false String.startsWith('My hovercraft is full of...', 'hovercraft', 3) == true ``` -------------------------------- ### String.substring example Source: https://neos.readthedocs.io/en/8.3/References/EelHelpersReference.html Returns characters from a string between start and end indices. Follows the JavaScript specification for 'substring'. ```eel String.substring('Hello, World!', 7, 12) == 'World' String.substring('Hello, World!', 7) == 'World!' ``` -------------------------------- ### Install git and hub (Debian/Arch) Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/BeginnersGuide.html Install git and hub on Debian-based systems with apt-get and on Arch Linux with pacman. The comments indicate the respective package managers. ```bash sudo apt-get install git-all hub #(Debian Based) sudo pacman -Sy git hub #(Arch Linux) ``` -------------------------------- ### String.substr example Source: https://neos.readthedocs.io/en/8.3/References/EelHelpersReference.html Returns characters from a string starting at a given offset up to a length. Follows the JavaScript specification for 'substr'. ```eel String.substr('Hello, World!', 7, 5) == 'World' String.substr('Hello, World!', 7) == 'World!' String.substr('Hello, World!', -6) == 'World!' ``` -------------------------------- ### Create a registration URI with Neos.Fusion:ActionUri Source: https://neos.readthedocs.io/en/8.3/Appendixes/ReleaseNotes/810.html Example from the release notes showing how to use Neos.Fusion:ActionUri to build a URI for a registration action. The request defaults to the current request, and all other attributes are equal to Neos.Fusion:UriBuilder. ```fusion uri = Neos.Fusion:ActionUri { package = 'My.Package' controller = 'Registration' action = 'new' } ``` -------------------------------- ### Neos.Neos:Plugin Fusion example Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Defines a prototype My.Site:Registration that extends Neos.Neos:Plugin, setting the package and controller. ```fusion prototype(My.Site:Registration) < prototype(Neos.Neos:Plugin) { package = 'My.Site' controller = 'Registration' } ``` -------------------------------- ### Neos.Fusion:Join with @position ordering example Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Shows how to use the @position meta property to control the order of nested definitions in a Neos.Fusion:Join object. The example demonstrates start, numeric, before, end, and after positions, and notes that the order is fixed regardless of definition order. ```fusion # in this example, we would not need to use any @position property; # as the default (document order) would then be used. However, the # order (o1 ... o9) is *always* fixed, no matter in which order the # individual statements are defined. myString = Neos.Fusion:Join { o1 = Neos.NodeTypes:Text o1.@position = 'start 12' o2 = Neos.NodeTypes:Text o2.@position = 'start 5' o2 = Neos.NodeTypes:Text o2.@position = 'start' o3 = Neos.NodeTypes:Text o3.@position = '10' o4 = Neos.NodeTypes:Text o4.@position = '20' o5 = Neos.NodeTypes:Text o5.@position = 'before o6' o6 = Neos.NodeTypes:Text o6.@position = 'end' o7 = Neos.NodeTypes:Text o7.@position = 'end 20' o8 = Neos.NodeTypes:Text o8.@position = 'end 30' o9 = Neos.NodeTypes:Text o9.@position = 'after o8' } ``` -------------------------------- ### Neos.Fusion:Component example with private props and renderer Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Creates a component with public props, private props, and a renderer. Shows how private props can reference each other and how the component scope works. ```fusion prototype(Vendor.Site:Component) < prototype(Neos.Fusion:Component) { title = 'Hello World' titleTagName = 'h1' bold = false @private { computedTitle = ${String.toLowercase(props.title)} funnyTitle = Neos.Fusion:Value { value = ${props.titleTagName + " " + private.computedTitle} } } renderer = Neos.Fusion:Tag { attributes.class { component = 'component' bold = ${props.bold && 'component--bold'} } content = Neos.Fusion:Join { headline = Neos.Fusion:Tag { tagName = ${props.titleTagName} content = ${private.funnyTitle} } // nestedComponentScope = Neos.Fusion:Component { // prop1 = ${props.title} // works // renderer = ${props.title} // doest work! // } } } } ``` -------------------------------- ### Array.reduce examples Source: https://neos.readthedocs.io/en/8.3/References/EelHelpersReference.html Shows two ways to use Array.reduce: with and without an initial value. The callback receives accumulator, current value, and key. Without initialValue, the first item is used as the accumulator and the callback starts with the second entry. ```eel Array.reduce([1, 2, 3, 4], (accumulator, currentValue) => accumulator + currentValue) // == 10 Array.reduce([1, 2, 3, 4], (accumulator, currentValue) => accumulator + currentValue, 1) // == 11 ``` -------------------------------- ### Simple Fusion render example Source: https://neos.readthedocs.io/en/8.3/References/ViewHelpers/Fusion.html Renders a Fusion object at the given path using the render ViewHelper. ```fusion some.given { path = Neos.Fusion:Template … } ``` ```fusion <ts:render path="some.given.path" /> ``` -------------------------------- ### Fusion: Use Neos.Backend.interfaceLanguage() helper Source: https://neos.readthedocs.io/en/8.3/Appendixes/ChangeLogs/820.html Example usage of the new Fusion EEL helper ${Neos.Backend.interfaceLanguage()} to get the backend interface language. The helper returns a string like 'de' or 'en'. If no user is available, an assert will fail and may throw an error depending on PHP configuration. ```fusion root = ${Neos.Backend.interfaceLanguage()} ``` -------------------------------- ### Show available make commands Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/Documentation.html Displays an overview of the commands provided by the Makefile. Requires Sphinx to be installed. ```bash make help ``` -------------------------------- ### Basic usage, GET method Source: https://neos.readthedocs.io/en/8.3/References/ViewHelpers/FluidAdaptor.html Outputs a form tag with the given action and method="get". The expected result is a form tag with method="GET". ```html <f:form action="..." method="get">...</f:form> ``` ```html <form method="GET" action="...">...</form> ``` -------------------------------- ### Minimal example: variantMenuItems = Neos.Neos:DimensionsMenuItems Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Outputs a menu with all configured dimension combinations. ```fusion variantMenuItems = Neos.Neos:DimensionsMenuItems ``` -------------------------------- ### Install bundler Source: https://neos.readthedocs.io/en/8.3/Contribute/Code/EmberUI.html Install bundler using gem. Required for Ruby dependencies. ```bash sudo gem install bundler ``` -------------------------------- ### Minimal DimensionsMenu example Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Creates a menu with all configured dimension combinations. ```fusion variantMenu = Neos.Neos:DimensionsMenu ``` -------------------------------- ### Output of f:layout example Source: https://neos.readthedocs.io/en/8.3/References/ViewHelpers/TYPO3Fluid.html The output of the f:layout example, which is no output. ```text (no output) ``` -------------------------------- ### Output of scientific notation example for f:format.printf Source: https://neos.readthedocs.io/en/8.3/References/ViewHelpers/TYPO3Fluid.html Shows the output of the printf example, which is 3.625e+8. ```text 3.625e+8 ``` -------------------------------- ### Show active configuration: ./flow configuration:show Source: https://neos.readthedocs.io/en/8.3/References/CommandReference.html Example invocations of the neos.flow:configuration:show command to display the active configuration settings. The command shows the configuration of the current context as used by Flow. Options include --type and --path. ```bash ./flow configuration:show ``` ```bash ./flow configuration:show –path Neos.Flow.persistence ``` ```bash ./flow configuration:show –type Caches –path Flow_Object_Classes ``` -------------------------------- ### Neos.Neos:Plugin Fusion example with argument Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Extends the previous example by adding an action and an internal argument named 'additionalArgument'. ```fusion prototype(My.Site:Registration) < prototype(Neos.Neos:Plugin) { package = 'My.Site' controller = 'Registration' action = 'register' additionalArgument = 'foo' } ``` -------------------------------- ### find: identifier example Source: https://neos.readthedocs.io/en/8.3/References/FlowQueryOperationReference.html Example of using the find operation with a node identifier to retrieve a node. ```plaintext q(node).find('#30e893c1-caef-0ca5-b53d-e5699bb8e506') ```