Skip to the content
Documentation

stylesheets

No ratings yet

If you want to use stylesheets in the XML Block there is a condition you have to serve.
In content.ini(.append.php) there has to be added a line under the type of htmltag you wish to use your own stylesheet. Edit like this:

[paragraph]
AvailableClasses[]=myblockstyle

This makes it possible to create a new style “myblockstyle” in one of your .css files included in the pagelayout.tpl. To edit the XML Block, you have to deactivate the online editor. That can be done by the Button right under the Editor Field. When you enter “< p class=”myblockstyle” >…< / p > right into the online editor, the html tags will be converted into &lt; and &gt;, because the online Editor thinks, you want to show exactly what you’re typing. In the deactivated Editor you can see the tagged code of your previous entries. There you can enter

<p class=”myblockstyle”>…</p>

In the Publishing function all classes will be checked for vaildiy. So eZ won’t find your class, if you did not made the changes in the content.ini available for the sideaccess to show the xml block AND the sideaccess to edit the XML Block (like admin). So I suggest to make the changes for content.ini in the Folder eZ/settings/override and not in the sideaccesses or the extension. By the way – eZ will find your style class even, if it’s stored under a design extension. So in eZ/extension/myExtension/design/stylesheets you can write like:

p.myblockstyle {
  color: #ff0000;
}