svenlie / headless-viewhelper
Extension to provide some fluid viewhelper with JSON output
Installs: 34
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:typo3-cms-extension
Requires
- ext-json: *
- typo3/cms-core: ^13.4
README
Installation
Install extension using composer
composer require svenlie/headless-viewhelper
Usage
Use the following fluid namespace:
<headlessViewhelper:form additionalAttributes="{data-anything: 'some info', data-something: 'blub'}" class="bla" action="submit" name="customer"> <headlessViewhelper:form.textfield name="myTextBox" value="default value" /> </headlessViewhelper:form>
If you want to structure your viewhelpers you can use the following ViewHelpers:
<headlessViewhelper:jsonArray identifier="global"> <headlessViewhelper:jsonElement identifier="form"> <headlessViewhelper:form additionalAttributes="{data-anything: 'some info', data-something: 'blub'}" class="bla" action="submit" name="customer"> <headlessViewhelper:form.textfield name="myTextBox" value="default value" /> </headlessViewhelper:form> </headlessViewhelper:jsonElement> <headlessViewhelper:jsonElement identifier="dummy"> <examplePackage:dummy /> </headlessViewhelper:jsonElement> </headlessViewhelper:jsonArray>