I need to build an Extension in typo3 7.6.I include a css file in setup.txt using
page.IncludeCSS = Ext.Path_to_css_file.css
But the styles in my css file is override by some other custom styles.How can I prevent this.Any Idea? I am new to typo3.Please help me.Thank you in advance.
Another way to do that, dirty but without editing an extension template:
Using HMENU here because FILES object can't provide same inheritance as including through template method. But if you don't need inheritance you can do this:
Then import object to headerData:
or (if you are including JS)
Now you can just create a relations to needed files on Resources tab in page settings. Not sure if all versions of Typo3 allows css and js for relations, but 6.2-8.7 does)
You have to give each css file you want to include a unique key (e.g.
myCssFile1
). Also use a colon after theEXT:
. So the correct way of including a CSS file with TypoScript would be"page.IncludeCSS" is wrong, should be "page.includeCSS" followed by your custom unique array name like:
regards Pete