source: main/ngren.theme/trunk/ngren/theme/ngren_theme/rules.xml @ 10253

Last change on this file since 10253 was 10253, checked in by uli, 11 years ago

Avoid user-options dropdown if there would be no menu items to select.

File size: 3.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<rules
3    xmlns="http://namespaces.plone.org/diazo"
4    xmlns:css="http://namespaces.plone.org/diazo/css"
5    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6    xmlns:xi="http://www.w3.org/2001/XInclude">
7
8  <theme href="home.html" css:if-content="body.template-frontpageview" />
9  <theme href="full.html" css:if-content="#portal-column-content.width-full"/>
10  <theme href="example.html"/>
11  <notheme if="$ajax_load" />
12  <!--<notheme if="contains($path, 'manage')"/>-->
13  <notheme if="contains($path, 'plugins')"/>
14  <notheme if="contains($path, 'querybuilder')"/>
15  <notheme if="contains($path, 'advanced/anchor.htm')"/>
16  <notheme if="contains($path, 'advanced/source_editor.htm')"/>
17  <notheme if="contains($path, 'image_view_fullscreen')"/>
18  <notheme if-path="@@manage-viewlets" />
19
20
21  <!-- Head -->
22  <before content="/html/head/meta" css:theme="meta" />
23  <replace theme="/html/head/title" content="/html/head/title"
24           if-not-path="/" />
25  <replace theme="/html/head/base" content="/html/head/base" />
26  <append theme="/html/head" content="/html/head/script" />
27  <append theme="/html/head" content="/html/head/link | /html/head/style" />
28
29
30  <!-- Top / Header -->
31  <copy attributes="href" css:content='#portal-logo'
32        css:theme="#logo-container a" />
33
34  <!-- User options (upper right) -->
35  <!--      user name in options menu   -->
36  <replace css:theme-children="#user-options-name"
37           css:content-children="#portal-personaltools li:nth-child(1) a" />
38  <!--      href of username link -->
39  <copy attributes="href"
40        css:content="#portal-personaltools li:nth-child(1) a"
41        css:theme="#user-options a:nth-child(1)" />
42
43  <!--      2nd to last link of user options (separators filtered out)
44            These go into user options dropdown
45  -->
46  <copy css:theme="#user-options ul"
47        css:if-content="#portal-personaltools li:nth-child(3)">
48    <xsl:for-each css:select="#portal-personaltools li">
49      <xsl:if test="not(position() mod 2 = 0)">
50        <xsl:if test="not(position() = 1)">
51          <xsl:copy-of select="." />
52        </xsl:if>
53      </xsl:if>
54    </xsl:for-each>
55  </copy>
56  <!--       if user options are empty (only login and separator):
57             avoid dropdown -->
58  <drop css:theme="#user-options ul"
59        css:if-not-content="#portal-personaltools li:nth-child(3)">
60  </drop>
61  <drop css:theme="#user-options a:nth-child(2)"
62        css:if-not-content="#portal-personaltools li:nth-child(3)">
63  </drop>
64  <!-- /user-options -->
65
66  <replace css:theme=".navbar-form" css:content="#portal-searchbox form"/>
67  <drop css:content=".searchSection"/>
68  <drop css:content="#LSResult"/>
69
70
71  <replace css:theme-children="#menu-collapse .nav"
72           css:content-children="#portal-globalnav"/>
73  <!-- Frontpage Content -->
74  <replace css:theme=".full-col" css:content=".full-col"
75           css:if-content="body.template-frontpageview"/>
76  <replace css:theme=".rslides" css:content=".rslides"/>
77  <replace css:theme=".left-col" css:content=".left-col"
78           css:if-content="body.template-frontpageview"/>
79
80
81  <replace css:theme-children=".right-col"
82           css:content-children="#portal-column-two"
83           css:if-not-content="body.template-frontpageview"/>
84  <replace css:theme-children=".right-col"
85           css:content-children="#newsportlet"
86           css:if-content="body.template-frontpageview"/>
87
88  <!-- Content -->
89  <before css:theme=".rslides_container" css:content="#edit-bar"/>
90
91  <copy css:theme=".content-container"
92        css:content-children="#portal-column-content"/>
93
94  <!-- Footer -->
95  <replace css:theme=".footer .section"
96           css:content="#portal-footer-wrapper .section"/>
97
98</rules>
Note: See TracBrowser for help on using the repository browser.