degordian/yii2-frontend-controller

A special controller for your frontend department that allows for easy access to any view/layout combination without going through their respective controllers (avoiding the need to login or have a db).

Installs: 19

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 7

Forks: 0

Type:yii2-extension

pkg:composer/degordian/yii2-frontend-controller

v1.0.0-beta 2016-02-27 12:31 UTC

This package is not auto-updated.

Last update: 2025-10-03 23:07:47 UTC


README

A special controller for your frontend department that allows for easy access to any view/layout combination without going through their respective controllers (avoiding the need to login or have a db).

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist degordian/yii2-frontend-controller "*"

or add

"degordian/yii2-frontend-controller": "*"

to the require section of your composer.json file.

Usage

To access the module, you need to add this to your application configuration:

<?php
    ......
    'modules' => [
        'frontend' => [
            'class' => 'degordian\frontendController\Module',
        ],
    ],
    ......

Then to use this extension open up http://your-project.local/frontend/<layout>/<controller>/<action>

Advanced usage allows for a custom output message or dynamic number of iterations by appending ?m=&i= example:

http://my-project.local/frontned/main/site/index?m=Short+message&i=15