Test if a file is loaded - zend-framework

Is there a way in phpUnit to test if for example a certain css file is loaded?
In other words, i want to check if a css file is loaded (if possible). I want to make sure the HMTL output has a style tag with a certain css file.

You can do it as
Foe example the page source will display the css file as
<style src="mycss.css" type="text/css"></style>
Then following statement will check that the element present or not
$this->assertTrue($this->isElementPresent("//style[#src='mycss.css']"));

Related

How do I move or include compressed and concatenated CSS to footer in TYPO3?

Seems like a simple question, since you can do it with JS files, but I can't seem to find an answer.
I know for javascript things like moveJsFromHeaderToFooter and includeJSFooter exist in typoscript config, but no such setting for stylesheets.
I compress and concatenate my stylesheets as well, so the result isn't a static file either.
I am not discussing its right or not but if you want to move whole CSS to footer here is the solution:
Copy file public/typo3/sysext/core/Resources/Private/Templates/PageRenderer.html to some location in your basic extension like myext/Resources/Private/Templates/PageRenderer.html
In Template Typoscript put:
config.pageRendererTemplateFile = EXT:myext/Resources/Private/Templates/PageRenderer.html
In myext/Resources/Private/Templates/PageRenderer.html you see markers. Just move CSS markers you want to bottom.
The style tag is only valid in the head section. Thats why TYPO3 does not provide a move to footer option.
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style
So please create valid html

Adding own CSS to TYPO3 backend [v9]

I am trying to add some CSS styles to the TYPO3 backend (v9). I've added the stylesheet and the following line to the ext_tables.php of my own extension (as described in the file typo3/sysext/backend/Classes/Template/DocumentTemplate.php).
$GLOBALS['TBE_STYLES']['skins'][$_EXTKEY]['stylesheetDirectories'] = ['EXT:my_extension/styles.css'];
When I check the configuration, the new entry show up, so that looks fine. But I don't see any style changes to the backend.
Any ideas anyone? Thanks!
As the key value (stylesheetDirectories) indicates, this should point to a directory. It will add all .css files in that directory.
Also, don't set $GLOBALS['TBE_STYLES']['skins'][$_EXTKEY]['stylesheetDirectories'] as a new array, but use $GLOBALS['TBE_STYLES']['skins'][$_EXTKEY]['stylesheetDirectories'][] = 'EXT:my_extension/styles/';. That way other extensions can also add stylesheets without it being overwritten by your extension.

Exporting org-mode to HTML: Include custom sitemap above the title

I would like to include a short sitemap like
[[./page1.org]] [[./page2.org]] [[./page3.org]]
which I have contained in a file called sitemap-banner.org, but I would like for this to appear at the top of the page, above the title. When I start an org-mode document with
#+INCLUDE: sitemap-banner.org
#+TITLE: pagetitle
and export as HTML, the title still appears above this banner. Is there a way to change this behavior, or are there any other suggestions for including such a sitemap?
I guess this must be solved through CSS placement rules.

Replace Bootstrap default css

I am trying out divshot for to evaluate if we can use it for our company, but have one question. Our company uses a custom version of bootstrap, is there a way to specify a "theme" for bootsrap or to replace the bootstrap default css? I've basically ripped all drop shadows and border radius from everything and made the styles more flat. Just wanted to know if we could over ride that default bootstrap stylesheet.
Thanks!
Yes, you can upload a custom bootstrap.css file into your project and then simply replace the <link> tag in any Divshot HTML page with a relative link. So if I uploaded my custom theme to css/my-bootstrap.css in the project, I could then link it like so:
<link rel="stylesheet" href="css/my-bootstrap.css">

HTML code not working correctly in Joomla1.5

Hi just started Joomla1.5
Included some HTML code a table and lists within my Joomla1.5 but table border not showing
and lists not aligned at all not sure why.
Imported the extension that allows one to embedd HTML code and used the
{loadposition CustomHTMLpostion} within a content article tested the HTML code with
Textpad works fine but not in Joomla1.5 - any ideas?
Check CSS files of your template, they must have been styling your HTML.
Use firebug(for firefox), to check which CSS styling is being applied on your table or list.
Then override that CSS.