Additional/Custom CSS on Block add.php

Permalink
Howdy,

I am building a custom block, and haven't figured out just how to implement my own css into the block's add.php popup window. I have javascript functioning properly in the popup window (being in a js directory of my block), but the styling of my divs/such within it aren't working.

Basically I created my desired form with its styling/javascript apart from concrete5, got it working splendidly, and then began the process of turning that into a concrete5 add.php form.

So all this said, just how should I go about adding my own css to my custom block's add.php popup window?

Cheers,

-Landson

Landson
 
Landson replied on at Permalink Reply
Landson
Just in case anyone is looking for a solution to this as well, I found that the following:

public function add()
{
     $html = Loader::helper('html');
     $this->addHeaderItem($html->css('/blocks/custom_block/css/form.css'));
     $this->addHeaderItem($html->javascript('/blocks/custom_block/js/form.js'));
}


Worked as desired. I had tried something like this before, but I hadn't specified an absolute path to my css and js files. Thishttp://www.concrete5.org/community/forums/customizing_c5/view-css-n... post was very useful in figuring this out.

Cheers

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.