Share » Forums » Setup & design » css styles and xmltext

css styles and xmltext

css styles and xmltext

Wednesday 03 March 2004 10:47:56 am - 8 replies

Author Message

Paul Forsyth

Wednesday 03 March 2004 11:13:03 am

According to the main content ini file the format is:

[ul]
AvailableClasses[]=ulRed
AvailableClasses[]=ulBlue

and not AvailableStyles. Try this.

It is true the default paragraph xml template doesnt include anything for classification. But you could override this with your own that does include a classification field. The same goes with any other template you need to change.

paul

Alex Jones

Wednesday 03 March 2004 11:20:12 am

Trond, ultimately you can use CSS to style almost any tag you would like, so that shouldn't be an issue.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Clay Pereira

Wednesday 03 March 2004 3:43:07 pm

Hi the solution is actually very simple. Just modify your exml datatype tags to include the $classification variable. Then you can use any class. For example:

I modified the standard strong.tpl template as follows:
standard/templates/content/datatype/view/ezxmltags/strong.tpl

<b class="{$classification}">{$content} </b>

Now inside my xml txt field i can call my blue font class:
<strong class="bluefont"> Something Blue</strong>

I hope this helps.
clay

Trond Åge Kvalø

Thursday 04 March 2004 12:48:07 am

Thanks guys, I really appreciate your help.

Paul, The AvailableStyles was a typo, I copied the line above end edited the name of the classes, so that shouldn't be it. We're talking about the main content.ini file here right?

I thought maybe a bit more information could be in place.

We're building an e-learning portal for a local branch of Hydro, the oil company. They have to follow certain corporate design rules. So they have provided us with a their corporate stylesheet, so I need to make all my text follow this stylesheet.

So in order to achieve this I must edit the templates in content/datatype/view/ezxmltags so that they contain class="{$classification}". Then I must copy all of my stylenames from the corporate stylesheet into content.ini.

Is this the correct procedure? Or have I misunderstood totally.

Best regards
Trond Kvalo

trondåge

Paul Forsyth

Thursday 04 March 2004 1:42:12 am

Trond,

You have it correct.

However, i would suggest creating override templates for those you are going to change, and also create an override content.ini.append file to include any extra classifcation settings you need to add.

It is much easier to manage and maintain only the changes you need :)

Most of your css styles will likely be used in regular templates, and a few in the ezxmltag templates, so hopefully you don't need to add too many to content.ini.

paul

Trond Åge Kvalø

Monday 22 March 2004 1:09:50 pm

Ok, can someone help me please.

I have copied the templates paragraph.tpl and ul.tpl from the standard design directory into my own design directory. I don't <b>have to</b> replicate the catalog structure from the standard design directory, do I?

the templates has been changed to

<p class="{$classification}"> <ul class="{$classification}">
{$content} and {$content}
</p> </ul>

in my content.ini.append I've put the following lines:

[ul]
AvailableClasses=coursedescription

[p]
AvailableClasses=body-main
AvailableClasses=header-sub
AvailableClasses=header-mid
AvailableClasses=img-caption

The funny (or frustrating depending on your view/mood/tiredness) thing is that I can use the [ul] styles, but not the [p] styles.

What have I done wrong? Do I need to change [p] into [paragraph]? (Although I think I've tried that too)

<RogerRabbitMode>Pllllllllllleeeeeeeattthhh</RogerRabbitMode> help me!

best regards
trondåge

trondåge

Leif Arne Storset

Tuesday 08 August 2006 2:50:21 am

It appears that the list of available classes in the Online Editor is hard-coded into ezeditor.js or ezmozillaeditor.js.

From ezeditor.js:996, OE version 4.1.1:

    toolbarTags += "<select id='" + this.objectRef + "_select_header' onChange=changeHeading('" + this.objectRef + "')>"
        + "   <option value='normal' selected>"+textStrings["Normal"]+"</option>\n"
        + "   <option value='Heading 1'>"+textStrings["Heading1"]+"</option>"
        + "   <option value='Heading 2'>"+textStrings["Heading2"]+"</option>"
        + "   <option value='Heading 3'>"+textStrings["Heading3"]+"</option>"
        + "   <option value='Heading 4'>"+textStrings["Heading4"]+"</option>"
        + "   <option value='Heading 5'>"+textStrings["Heading5"]+"</option>"
        + "   <option value='Heading 6'>"+textStrings["Heading6"]+"</option>"
        + "   </select>";

I hope that there are plans to enable extending the class list without hacking the JavaScript.

Leif Arne Storset

Vytautas Germanavičius

Saturday 31 March 2007 11:38:27 am

So, it still not possible to use my own defined css? :(

{set-block scope=root variable=cache_ttl}0{/set-block}

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu