PITS Blog
  • Home
  • Services
    • Dedicated team Have your own development team at our location in Kerala, India. We tailor our employees individually to your project.
    • Website & web shop Get into the online business and sell your products around the clock. Or convince yourself with a modern website on desktop and mobile devices.
    • Application development We develop very individual web or software applications for you for a wide variety of needs.
    • Hybrid or native iOS & Android Apps Online business is often done on the go today, and the trend is rising. Invest now and make your software mobile-compatible.
  • Credentials
  • Technology
  • Process
  • About us
  • Contact
  • White papers
  • Jobs
  • Blog
  • Startups
�
Avatar

Create your own site with TYPO3 Flow

By Sivaprasad S on September, 29 2014
demo post

By Visakh R N

WordPress and .NET

By Priyanka K

Roadmap to become a DevOps Engineer

By Francis Varghese

Gutenberg - More Than Just An Editor

By Priyanka K

Flow3 a php based framework ,through which web-developers can create excellent web solutions.This blog is about,creating a website in flow3 and how templating can be done with the help of fluid.

Installing FLOW3

Setting up TYPO3 Flow is pretty straight-forward.
See below for System requirements.

A web server ( Apache with the mod_rewrite module enabled )
PHP 5.3.2 or > (Check your phpinfo() to know your php version)
A database supported by Doctrine DBAL, such as MySQL Command line access

The following command will clone the latest version, include development dependencies and keep git metadata for future use:

php composer.phar create-project --dev --keep-vcs typo3/flow-base-distribution PROJECT_NAME

After that,Kindly give proper perimission for all the files and folders.

./flow core:setfilepermissions username webservername group-name

Above command will give appropriate permission for all folders and files. For further informations kindly run the command ./flow help in terminal.

Once the clonning of the website is done , add new virtual host by modifying the httpd-vhost.conf file.

For creating a new extension/Package

flow.bat kickstart:actioncontroller --generate-actions --generate-related Acme.Demo CoffeeBean (In windows)

./flow kickstart:actioncontroller --generate-actions --generate-related Acme.Demo CoffeeBean (In Linux)

Database Setup

Create an empty database and set up a user with sufficient access rights

Copy the file Configuration/Settings.yaml.example to Configuration/Settings.yaml.

Open and adjust the file to your needs – for a common MySQL setup, it would look similar to this:


TYPO3:
  Flow:
    persistence:
    backendOptions:
        driver : 'pdo_mysql'
        dbname : 'databasename' # adjust to your database name
        user : 'username' # adjust to your database user
        password: 'password' # adjust to your database password
        host : 'host' # adjust to your database host

After providing all the necessary informations related your database in Settings.yaml file, run ./flow doctrine:migrate in terminal .

Templating for website

For creating a theme/template for a website there is a function in Flow3 called “setLayoutPathAndFilename” that can be triggered in the ”initializeView” function. So we should built a base controller
eg: ThemeController and any new controller should extend this newly created base class.


  class ThemeController extends \TYPO3\FLOW3\MVC\Controller\ActionController {
    public function initializeView(\TYPO3\FLOW3\MVC\View\ViewInterface $view) {
      $view->setLayoutPathAndFilename(“PATH_TO_TEMPLATE”);
  }
}

PATH_TO_TEMPLATE it should be the path to an existing template file.
Eg ../PKGS/Application/PKG.NAME/Resources/Private/Layouts/file.html
And in the newly added Layout file add

.

Routing In Flow3 framework

Change the Routes.yaml file add your routes in that file .

-
name: 'Welcome Screen' // It is not mandatory to add name
uriPattern:'index/index'
  defaults:
    '@packages': 'TYPO3.Index'
      '@controller':'coffeebean'
    '@actoion':'index'
    '@format':'html'

To set this package as the index package leave uriPattern as empty. The route becomes active if a requests matches the pattern defined by the uriPattern.

For furthur references please vist :
http://docs.typo3.org/flow/TYPO3FlowDocumentation/Quickstart/Index.html
http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/Index.html

We'd love to hear from you.

Contact us

Switzerland
thomas(at)pitsolutions(dot)com
+41 (0) 43 558 4360

India
enquiries(at)pitsolutions(dot)com
+91 (0) 471 270 0615 / 715

UAE
mohammed(at)pitsolutions(dot)com
+971 (0) 4 359 8610

USA
arnab(at)pitsolutions(dot)com
+1 (0) 703 945 8076

Copyright © 2019PIT Solutions AG.An ISO 9001:2015 certified company. All Rights Reserved

SCROLL TO TOP