Jump to content

addCSS for ModuleAdminController not working...


Recommended Posts

I'm busy creating an Admin module and extending the ModuleAdminController class. I'm trying to add some CSS by using the following:

 

 

class AdminPrintspecJobsController extends ModuleAdminController
{
   public function setMedia()
   {
       parent::setMedia();
       $this->addCss(_MODULE_DIR_ . $this->module->name . "/css/printspec_table.css");
   }

   // ...
}

 

When I refresh my admin page, in Chrome, the Network panel indicates the file is added to the DOM, but it fails with an HTTP 404, not found error.

 

My folder structure looks as follows:

 

 

.
├── AdminTab.gif
├── config.xml
├── controllers
│   └── admin
│       ├── AdminPrintspecJobs.php
│       └── AdminTab.php
├── css
│   └── printspec_table.css
├── printspec.php
└── views
   └── templates
       └── admin
           └── printspec_jobs
               └── jobs.tpl

 

What am I doing wrong here?

Link to comment
Share on other sites

Let me rephrase the question...

 

I want to view a css file, directly in my browser, the file is located in:

 

.../myprestashop/modules/printspec/css/printspec.css

 

I'm trying to see if it loads by visiting:

 

http://myprestashop.com/modules/printspec/css/printspec.css

 

but getting a 404. How do I see the CSS file? If I can do this, I can figure the rest out.

Link to comment
Share on other sites

×
×
  • Create New...