Skip to content

Theme trouble and fix #9

@brandonferens

Description

@brandonferens

Thanks so much for this awesome plugin. I was having a couple issues with it as it was not throwing any errors with my theme's css folder being unwritable. I changed a few things around so I could use the current theme's less files dynamically and use Cake's built in themePath function.

The set_theme function:

private function set_theme() {

  $theme_path = App::themePath($this->theme) . 'webroot' . DS;
  $this->lessFolder = new Folder($theme_path.'less');
  $this->cssFolder = new Folder($theme_path.'css');

}

The first part of the css helper function:

public function css($file) {

  if ($this->theme) {
    $this->set_theme();
  }
...

The helper doesn't need the second parameter now if a theme is being used. Hope this helps!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions