You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2006/06/09 12:26:10 UTC

[1.4] Resource-type specific CSS in default publication

Hi Lenya devs,

currently, the default publication includes a resource-type specific
CSS by default:

<xsl:when test="$document-type">
   <link rel="stylesheet" href="{$root}/css/{$document-type}.css" type="text/css"/>
</xsl:when>

This leads to exceptions in the logs when the CSS does not exist.
Can't we find a better way to support resource-type specific CSS?

-- Andreas


-- 
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
andreas.hartmann@wyona.com                     andreas@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [1.4] Resource-type specific CSS in default publication

Posted by Jörn Nettingsmeier <po...@uni-duisburg.de>.
Andreas Hartmann wrote:
> Hi Lenya devs,
> 
> currently, the default publication includes a resource-type specific
> CSS by default:
> 
> <xsl:when test="$document-type">
>   <link rel="stylesheet" href="{$root}/css/{$document-type}.css" 
> type="text/css"/>
> </xsl:when>
> 
> This leads to exceptions in the logs when the CSS does not exist.
> Can't we find a better way to support resource-type specific CSS?

modules should be able to inject their own xhtml header tags, not just a 
<div id="body"/>. that's the only way for modules to use their own css 
without violating the soc principle. the publication has no way of 
knowing that its modules need css.

the quickest solution would be for modules to produce fragments:

<link rel="stylesheet"...>
<div id="body">
   ...
</div>

and for the page2xhtml.xsl of the publication to merge those in.

the problem is what to do with those extra tags: do they replace any 
existing ones, or are they added? if added, will they end up before or 
after the publication-global tags? (very important in the case of css.)

we will probably have to handle every single xhtml header element on its 
own:

title: must replace the pub-global one
link[@rel='stylesheet']: should be added after any pub-global ones.
link[@rel='SHORTCUT ICON']: must replace the global one
etc...

setting meta tags in modules should be discouraged for simplicity.



-- 
"Open source takes the bullshit out of software."
	- Charles Ferguson on TechnologyReview.com

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-due.de, Telefon: 0203/379-2736

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org