![]() |
|
twAdminPlugin - 0.1.0Backend module based on sfAdminDashPlugin |
|
I had to create nice backend for my Thunderwolf Project and here is result.
This plugin is based on sfAdminDashPlugin created by Kevin Bond. Like him I had to create a menu to access all the various modules.
This plugin automates the process by using a configuration files.
twCorePlugin Base plugin for all Thunderwolf Plugins
sfGuardPlugin The Best plugin for authentication
Install the plugin, clear the cache and activate the twDefault and twAdmin module in the application's settings.yml.
enabled_modules: [default, twDefault, twAdmin]
Publish the plugin's assets:
plugin:publish-assets
If the modules are admin generator modules, deactivate the default admin generator theme in each module's generator.yml by creating a css property. You can either point the css property to a real stylesheet or just use a placeholder.
generator:
class: sfPropelGenerator
param:
model_class: Article
theme: thunderwolf
non_verbose_templates: true
with_show: false
singular: ~
plural: ~
route_prefix: article
with_propel_route: 1
css: nothing #setting the css to a placeholder
config:
actions: ~
fields: ~
list: ~
filter: ~
form: ~
edit: ~
new: ~
Add the plugin's header and footer partials to your applications global layout:
<body>
<div id="wrapper">
<?php include_component('twAdmin', 'top') ?>
<?php include_component('twAdmin', 'menu') ?>
<div id="layout-content" class="layout-row">
<div class="layout-box">
<?php echo $sf_content ?>
</div> <!-- .layout-box -->
</div> <!-- #layout-content -->
<?php include_partial('twAdmin/bottom') ?>
</div> <!-- #wrapper -->
</body>
Copy files from twAdminPlugin/data/skeleton/apps/backend/modules to your app modules.
Set your application's homepage in your application's routing.yml to:
homepage:
url: /
param: { module: twAdmin, action: index }
The plugin's app.yml file looks like the following:
all:
tw_admin:
web_dir: /twAdminPlugin
image_dir: /twAdminPlugin/images/
default_image: logo.png
resize_mode: thumbnail
site: My Site
site_start_year: 2009
include_path: true
include_jquery_no_conflict: false
logout: true
login_route: @sf_guard_signin
logout_route: @sf_guard_signout
You can override these settings as you see fit.
[TODO]...Works different from oryginal plugin...[TODO]