[opencms-dev] Print edit content

Hans van der Linden hans at iblinden.nl
Mon Jan 3 12:13:00 CET 2005


Juan,

You can create a print.jsp like this:

// start print.jsp

<%@ page session="false" import="org.opencms.jsp.*,org.opencms.file.*" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>

<%
// Create a JSP action element
CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,response);
java.util.Locale lc = new java.util.Locale("en","EN");

String uriForPrinting = request.getParameter("file");
String bodyContent = cms.getContent(uriForPrinting,"body",lc);

%>

<%=bodyContent%>

<script>
window.print();
</script>

// end print.jsp

use for example print.jsp?file=/opencms/opencms/index.html

Best way is to popup the print.jsp file !

Regards

Hans


-----Oorspronkelijk bericht-----
Van: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org]Namens juan diablo
Verzonden: donderdag 30 december 2004 18:07
Aan: opencms-dev at opencms.org
Onderwerp: [opencms-dev] Print edit content


Hello:

I need to print only the edit content of the html pages that i've created, y don't need the template, somebody can tell me how to do
this??

Thanks

Juan Felipe.
Colombia.
--
_______________________________________________
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10



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




More information about the opencms-dev mailing list