Skip to content

Own layout/theme/assets #4

@highstrike

Description

@highstrike

You must include the assets for the "backend" interface found in /test-helper

This plugin repository is currently lacking:

  • it's own layout.ctp.
  • assets like jquery, font awesome and the modal lib that are being used in the templates.
  • the Flash component should also be loaded by default as it's being used in the controllers.
  • the Flash design elements (Element/Flash/success.ctp and Element/Flash/error.ctp) maybe look at my component and include that in the project as well because it will load the elements from the plugin (once included).
  • the Tools.Format helper should also be loaded by default as it's being used in the views.
  • the TestHelper helper should also be loaded by default

Extra stuff needed to make this plugin work

currently my project's AppController.php looks like this:

class AppController extends Controller
{
    public function initialize() {
        parent::initialize();

        // dereuromark's testhelper
        if($this->request->getParam('plugin') == 'TestHelper') {
            $this->loadComponent('Flash');
        }
    }
}

and my project's AppView.php looks like this:

class AppView extends View
{
    public function initialize() {
        parent::initialize();

        // dereuromark's testhelper
        if($this->request->getParam('plugin') == 'TestHelper') {
            $this->loadHelper('Test'); //// this is my helper that will overwrite the layout in my project
            $this->loadHelper('Tools.Format');
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions