apache > lenya
 

CMS Screens How-To

A CMS screen is an HTML page that belongs to the Lenya CMS, not to a specific publication (this is the reason for choosing the term "screen" instead of "page"). Typical examples are site administration screens and confirmation screens.

File Locations

  • src/webapp/lenya/xslt/util/page2xhtml.xsl - The CMS screen stylesheet.

  • src/webapp/lenya/resources/css - The CMS screen CSS files.

Sitemap Usage

Usually a resource is used to style a CMS screen:

<map:resource name="style-cms-page">
  <map:transform src="lenya/xslt/util/page2xhtml.xsl">
    <map:parameter name="contextprefix"
                   value="{request:contextPath}"/>
  </map:transform>

  <map:serialize/>
</map:resource>

¨ This resource is called from the pipeline (the example serves the Lenya CMS starting page):

<map:match pattern="index.html">
  <map:aggregate element="lenya" ...>
    <map:part src="cocoon:/publications.xml"/>

    <map:part src="lenya/content/introduction.xml"/>
  </map:aggregate>
  <map:transform src="lenya/xslt/util/welcome.xsl"/>
  <map:call resource="style-cms-page"/>
</map:match>

Writing a CMS screen

To write a CMS screen, use the following syntax:

<page:page xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">

  <page:title>
    <!-- the page title (used for HTML title and heading) -->
  </page:title>

  <page:body>
    <!-- put your XHTML here -->
  </page:body>

</page:page>

Cascading Stylesheets

When using CSS classes or IDs, please follow the rule that every class or ID starts with the prefix lenya-.

Put your specific CSS file in the CSS directory (see above) and include it in default.css.

Currently, the following Lenya CSS classes are defined:

  • Boxes

    • div.lenya-box

    • div.lenya-box-title

    • div.lenya-box-body

  • Forms

    • td.lenya-entry-caption

    • .lenya-form-element

  • Tables

    • table.lenya-table

    • table.lenya-table-noborder

    • table.lenya-table th

    • table.lenya-table td

    • table.lenya-table-noborder td

  • Tabs

    • .lenya-tab

    • .lenya-tablink

  • Antlog

    • .lenya-ant-bannercell

    • table.lenya-ant-status

    • .lenya-ant-error

    • .lenya-ant-warn

    • .lenya-ant-info

    • .lenya-ant-debug

    • .lenya-ant-failed

    • .lenya-ant-complete

    • .lenya-ant-a td

    • .lenya-ant-b td

  • Misc

    • .lenya-body

    • .lenya-project-logo

    • td.lenya-content

    • td.lenya-sidebar

    • td.lenya-frontpage

    • .lenya-page-title

    • .lenya-page-subtitle

    • .lenya-publication-item

    • .lenya-sidebar a

    • .lenya-sidebar-heading