1
votes

I try to add custom css classes to bootstrap package included in Typo3 6.2. In my root template page, I add in the Setup section the following code:

page = PAGE
page.includeCSS.myCustomStylesheet = fileadmin/template/css/custom.css

but this typoscript has no effect in my source code, as if nothing is written.

Actually, when I include Bootstrap Package template in static template, every Basis templates are removed.

Any idea on how to proceed?

enter image description here

Edit: In bootstrap package, all CSS stylesheets are merged into a single file.

2

2 Answers

1
votes

the »EXT:«-string in your path is a shortcut to the extension-directory (»./typo3conf/ext/«). So in your example you would have an extension called »path_to_my_css«.

But i guess you probably uploaded a stylesheet into your filelist. If so, then click on the file to the see full path (like »http://example.com/fileadmin/templates/assets/css/bootstrap.css

Then set the correct path like this

page.includeCSS.myCustomStylesheet = fileadmin/templates/assets/css/bootstrap.css

You will now see a link to your file with an appended hash in the HTML sourcecode

<link rel="stylesheet" type="text/css" href="/fileadmin/templates/assets/css/bootstrap.css?1350898986" media="all">
1
votes

I had the same problem and found a solution on the github site of the bootstrap package. The problem is the default css concatenation and compression. If you deactivate it by

config.concatenateCss = 0

the css will be correctly included.

Source: https://github.com/benjaminkott/bootstrap_package/issues/33

There is a similar option for Javascript files:

config.concatenateJs = 0

Hope it helps.