dev-master
9999999-dev https://github.com/rithis/WebsiteIndexBundle
MIT
The Requires
by Vyacheslav Slinko
Symfony2 Bundle which compile all routes on single page., (*1)
Run this command in your project directory:, (*2)
``` bash $ composer.phar require rithis/website-index-bundle:@dev, (*3)
After that enable bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Rithis\WebsiteIndexBundle\RithisWebsiteIndexBundle(), ); }
First of all include bundle routing:, (*4)
``` yaml, (*5)
_rithis_website_index: resource: "@RithisWebsiteIndexBundle/Resources/config/routing.yml", (*6)
If you want to make redirect from main page then add one more route: ``` yaml # app/routing.yml _index: pattern: / defaults: { _controller: FrameworkBundle:Redirect:redirect, route: rithis_website_index_website_index_get }
By default only routes without parameters compiled. If you want to add routes with parameters you can configure bundle:, (*7)
``` yaml, (*8)
rithis_website_index: rithis_news_news_get: RithisNewsBundle:News ```, (*9)
Where key (ex. rithis_news_news_get) is route name and value (ex. RithisNewsBundle:News) is entity., (*10)
MIT