diff --git a/README.md b/README.md index d2dc6e93ddf711baf9dc3676415ae62c688fd68a..fdb930f9b77164066a713d420b18b393a8d823ea 100755 --- a/README.md +++ b/README.md @@ -1,41 +1,34 @@ # Instalation guide for SGalinski.TypoScriptReferenceFrontend Flow package -## Prerequisite +There are two guides in this file. +First one explains the steps to integrate this package with Forger project. +And the other explains how to install the package in new Flow project. -SGalinski.TypoScriptReferenceFrontend is Flow package, so you need first a flow project: +## Install SGalinski.TypoScriptReferenceFrontend to Forge project - composer create-project --dev --keep-vcs typo3/flow-base-distribution ProjectName - -You can use any project name you wish. If you already have Flow project, you can skip this step. - -## Install +### Prerequisite -The project can be installed by composer, or downloaded from git: - -### A) Install by composer +First, you need a flow project with Forger package installed in it. +To do so, follow these instructions: - TODO: Setup composer.json to install from git repository + https://github.com/wmdbsystems/WMDB.Forger - cd ProjectName - composer require ... - composer update - -### B) Download from git +### Install cd Packages/Application git clone git@gitlab.sgalinski.de:typo3/TypoScript-Forger.git SGalinski.TypoScriptReferenceFrontend - cd typo_script_backend - -## Supply the necessary routes + cd SGalinski.TypoScriptReferenceFrontend -Edit Routes.yaml of your project (`ProjectName/Configuration/Routes.yaml`) +### Supply the necessary routes -### If you are using WMDB.Forger package in same project +Edit Routes.yaml of main project (`ProjectName/Configuration/Routes.yaml`) It is important to include SGalinski.TypoScriptReferenceFrontend subRoutes before WMDB.ForgerSubroutes to avoid route conflicts. The prefix `ts` in uriPattern: `ts/<SGalinski.TypoScriptReferenceFrontend>` has purpose to avoid the conflict. +This complete Routes.yaml: + - name: 'TypoScriptReferenceFrontend' uriPattern: 'ts/<SGalinski.TypoScriptReferenceFrontend>' @@ -63,7 +56,75 @@ The prefix `ts` in uriPattern: `ts/<SGalinski.TypoScriptReferenceFrontend>` has FlowSubroutes: package: TYPO3.Flow -### In empty project Routes.yaml looks like this +### Configure view + +To be able to use menu from `WMDB.Forger` package, view configuration in main project is needed. + +In main project, add next lines to `ProjectName/Configuration/Views.yaml`: + + - + options: + layoutRootPaths: + 'WMDB.Forger/Layouts': 'resource://WMDB.Forger/Private/Layouts' + partialRootPaths: + 'WMDB.Forger/Partials': 'resource://WMDB.Forger/Private/Partials' + 'SGalinski.TypoScriptReferenceFrontend/Partials': 'resource://SGalinski.TypoScriptReferenceFrontend/Private/Partials' + # templateRootPaths: + # 'WMDB.Forger/Templates': 'resource://WMDB.Forger/Private/Templates' + # 'SGalinski.TypoScriptReferenceFrontend/Templates': 'resource://SGalinski.TypoScriptReferenceFrontend/Private/Templates' + +(if `Views.yaml` doesn't exist, create it) + +### Install backend + +This package is front end part of grater entity. +All the data which is used by this package is provided by RESTful web service: + + https://gitlab.sgalinski.de/typo3/TypoScript-Backend + +If the web service is not installed, follow it's readme to do so. + +### Access the package via browser + +This is access address: + + your.domain/ts/tsref + +### Add TypoScript reference link to Forger menu + +This code: + + <li><f:link.action package="SGalinski.TypoScriptReferenceFrontend" controller="tsref" action="index"><i class="fa fa-fw fa-file-text-o"></i> TypoScript reference</f:link.action></li> + +Needs to be added to the Forger file: + + Packages/Application/WMDB.Forger/Resources/Private/Partials/Menu.html + +under `Utility` menu. It should be at line 28. + + +================================================================ + + +## Install SGalinski.TypoScriptReferenceFrontend to new project + +### Prerequisite + +SGalinski.TypoScriptReferenceFrontend is Flow package, so you need first a flow project. + + composer create-project --dev --keep-vcs typo3/flow-base-distribution ProjectName + +You can use any project name you wish. If you already have Flow project, you can skip this step. + +### Install + + cd Packages/Application + git clone git@gitlab.sgalinski.de:typo3/TypoScript-Forger.git SGalinski.TypoScriptReferenceFrontend + cd SGalinski.TypoScriptReferenceFrontend + +### Supply the necessary routes + +Edit Routes.yaml of your project (`ProjectName/Configuration/Routes.yaml`) - name: 'TypoScriptReferenceFrontend' @@ -85,14 +146,14 @@ The prefix `ts` in uriPattern: `ts/<SGalinski.TypoScriptReferenceFrontend>` has FlowSubroutes: package: TYPO3.Flow -Uri prefix can be added if needed. +Uri prefix can be added if needed, e.g.: `uriPattern: 'ts/<SGalinski.TypoScriptReferenceFrontend>'`. -## Configure view +### Configure view To be able to integrate `SGalinski.TypoScriptReferenceFrontend` package with other packages -(for example to use existing menu from other package), view configuration in main project is needed. +(for example to use existing layout with menu from other package), view configuration in main project is needed. -Here is view configuration for integration with `WMDB.Forger` package. +Here is example of view configuration for integration with `WMDB.Forger` package. `ProjectName/Configuration/Views.yaml`: @@ -107,7 +168,7 @@ Here is view configuration for integration with `WMDB.Forger` package. # 'WMDB.Forger/Templates': 'resource://WMDB.Forger/Private/Templates' # 'SGalinski.TypoScriptReferenceFrontend/Templates': 'resource://SGalinski.TypoScriptReferenceFrontend/Private/Templates' -## Install backend +### Install backend This project is front end part of grater entity. All the data which is used by this package is provided by RESTful web service: @@ -115,3 +176,15 @@ All the data which is used by this package is provided by RESTful web service: https://gitlab.sgalinski.de/typo3/TypoScript-Backend If the web service is not installed, follow it's readme to do so. + +### Access the package via browser + +This is access address: + + your.domain/tsref + +### Fluid link to access the package + +Put this link in a menu: + + <f:link.action package="SGalinski.TypoScriptReferenceFrontend" controller="tsref" action="index"><i class="fa fa-fw fa-file-text-o"></i> TypoScript reference</f:link.action>