Update of /var/cvs/contributions/didactor2/src/core/metainf/tags/di/core
In directory james.mmbase.org:/tmp/cvs-serv17379
Modified Files:
head.tagx html.tagx
Log Message:
support for (print) css
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/metainf/tags/di/core
Index: head.tagx
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/core/metainf/tags/di/core/head.tagx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- head.tagx 18 Jan 2008 15:25:41 -0000 1.2
+++ head.tagx 22 Jan 2008 14:30:57 -0000 1.3
@@ -15,6 +15,11 @@
<script src="${_}"><!-- Help IE --></script>
</mm:link>
<link rel="stylesheet" type="text/css"
href="${mm:treelink('/css/base.css',includePath)}" />
+
+ <mm:treefile page="/css/print.css" objectlist="$includePath"
write="false">
+ <link href="${_}" rel="alternate stylesheet" title="Printer friendly"
type="text/css" media="screen" />
+ <link href="${_}" rel="stylesheet" type="text/css" media="print"/>
+ </mm:treefile>
<jsp:doBody />
</head>
</jsp:root>
Index: html.tagx
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/core/metainf/tags/di/core/html.tagx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- html.tagx 21 Jan 2008 14:15:24 -0000 1.7
+++ html.tagx 22 Jan 2008 14:30:57 -0000 1.8
@@ -16,6 +16,15 @@
<jsp:directive.attribute name="type" />
<jsp:directive.attribute name="component" />
<jsp:directive.attribute name="styleClass" />
+ <jsp:directive.attribute name="css" />
+ <!--
+ using doctype (strict mode) and returning text/xhml (in stead of
application/xhtml+xml
+ to please IE, which is a nasty, lousy browser
+ -->
+
+ <jsp:output doctype-root-element="html"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
<mm:content postprocessor="${empty postprocessor ? 'reducespace' :
postprocessor}"
type="${type}"
unacceptable="CRIPPLE"
@@ -36,6 +45,19 @@
<link rel="stylesheet" type="text/css" href="${_}" />
</mm:link>
</mm:haspage>
+ <mm:haspage page="/${component}/style/print.css">
+ <mm:link page="/${component}/style/print.css">
+ <link href="${_}" rel="alternate stylesheet" title="Printer
friendly" type="text/css" media="screen" />
+ <link href="${_}" rel="stylesheet" type="text/css"
media="print"/>
+ </mm:link>
+ </mm:haspage>
+ <c:if test="${! empty css}">
+ <mm:treehaspage page="${css}" objectlist="${includePath}">
+ <mm:treefile write="false" page="${css}"
objectlist="${includePath}">
+ <link rel="stylesheet" type="text/css" href="${_}" />
+ </mm:treefile>
+ </mm:treehaspage>
+ </c:if>
<mm:node referid="education">
<mm:field name="intro" escape="tagstripper,text/html/attribute">
<mm:isnotempty>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs