addHeaderItem incorrect path
PermalinkI am building a custom block and would like to include additional CSS in my add.php and edit.php.
I've read that the recommended way to do so is the following :
in controller.php :
public function edit() { // ... $html = Loader::helper('html'); $this->addHeaderItem($html->css('./blocks/gallery_to_fancyboxes/form.css')); }
However, I cannot get the right path to be included. The problem is that when I check the source code of my index.php concrete5 web page, I see that concrete5 automatically transformed this path into :
/concrete5/concrete/css/./blocks/gallery_to_fancyboxes/form.css?ts=1406028710935
Which of course is not what I want, since my form.css file is located in ./blocks/gallery_to_fancyboxes/form.css relative to index.php. I have checked that the CSS file is indeed taken into account if I manually change the path to ''./blocks/gallery_to_fancyboxes/form.css" using Firefox's inspector.
I also tried to write the path parameter differently in the addHeaderItem function, for example without the "./" at the beginning, but nothing works !
Please could you tell me how I should do it ? Many thanks

$this->addHeaderItem($html->css('/' . DIR_REL . '/blocks/gallery_to_fancyboxes/form.css'));
If that doesn't work you could try doing
$this->addHeaderItem($html->css(BASE_URL . DIR_REL . '/blocks/gallery_to_fancyboxes/form.css'));
And out of curiosity, why does it add a parameter called ts at the end of the url (?ts=1406033219585) ?
Don't forget to mark the correct answer. - Thanks