[opencms-dev] Multiple stylesheets for structured content

Matt Thomas matt.thomas at nn.k12.va.us
Tue Jun 23 15:12:42 CEST 2009


Hi Christian,

Thank you for your thorough explanation.  I've used templates in the past with custom styles with no problem.  However, because the configuration for the HtmlWidget is specified in the xsd file, it appears that it requires you to provide the path to the .css file and the _styles.xml file directly in the xsd.  The formatselect option turns on or off the drop-down for header 1, header 2, etc. but does not include styles from the stylesheet.  To activate the styles drop-down, you must include the following attributes (this is from the wiki page you linked to, and works for me):

configuration="css:/system/modules/MODULE_NAME/resources/css/my.css,stylesxml:/system/modules/MODULE_NAME/resources/css/my.css_style.xml, ...

So, it appears that these need to be hardcoded into the xsd file.  Perhaps I am on the wrong track?  I'm trying to figure out a dynamic way to use different styles based on the template, but it seems that the two are defined differently.

Thanks again for your help.

Matt

-----Original Message-----
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Christian Steinert
Sent: Tuesday, June 23, 2009 2:52 AM
To: The OpenCms mailing list
Subject: Released from SPAM quarantine: Re: [opencms-dev] Multiple stylesheets for structured content

normally, each template can have its own set of styles associated with it and you can make exactly these styles available in FCKEditor.

- First of all, each of your pages must of course have its template and/or template-elements property set to the path of a JSP template, for example /system/modules/my.site.module/templates/pagetemplate.jsp
- Secondly, the template JSP needs to have set ITS OWN "template" property to the the full opencms path of a .CSS file that can provide all the additional styles that should be usable by your editors, for example /sites/default/css/pagestyles.css
- Finally, there needs to be an XML file, that is called with the same name like your CSS file, yet with the additional suffix _styles.xml, for example /sites/default/css/pagestyles.css_styles.xml. This XML file must list all the styles out of your CSS file, that should be directly available for your editors through the editor's dropdown. See http://opencms-wiki.org/FCKEditor for an example of this XML file.
---------------
- Also, you need to activate the "styles" dropdown for the editor. This should be possible by adding the formatselect option to the Schema that describes this XML content type (see also http://opencms-wiki.org/HtmlWidget for an example of how to add this to your schema).

If this solves your problem, then maybe you can extend the two wiki-pages that I mentioned, so that they become a bit clearer.

Kind Regards
Christian

> Hello,
>
> I have created a structured content type that will be used across
> multiple templates. Each template uses its own stylesheet, and I
> would like for the HtmlWidget to reflect the styles contained within
> whichever template is being used. Does anyone have any ideas on how
> to accomplish this, or will I need to create a separate content type
> for each stylesheet?
>
> Thanks in advance for your help -
>
> Matt Thomas
>
> Newport News Public Schools
>
> Newport News Public Schools Confidentiality Notice: This e-mail
> message, including any attachments, is for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or distribution
> is prohibited. If you are not the intended recipient, please contact
> the sender immediately by reply e-mail and destroy all copies of the
> original message.
> _______________________________________________ This mail is sent to
> you from the opencms-dev mailing list To change your list options, or
> to unsubscribe from the list, please visit http://lists.opencms.org/
>
> mailman/listinfo/opencms-dev


______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev


Newport News Public Schools Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message.



More information about the opencms-dev mailing list