Advertisement
Guest User

Diazo - rules.xml

a guest
Nov 13th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.69 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <rules xmlns="http://namespaces.plone.org/diazo"
  3.       xmlns:css="http://namespaces.plone.org/diazo/css"
  4.       xmlns:xi="http://www.w3.org/2001/XInclude"
  5.       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  6.  
  7.     <xsl:output encoding="UTF-8" indent="no" method="html" version="5.0" />
  8.  
  9.     <xsl:strip-space elements="article section"/>
  10.     <xsl:preserve-space elements="span, div#hashtags, p.status"/>
  11.  
  12.     <!-- <notheme if="$host = 'edit.fhstp.ac.at'" /> -->
  13.     <!-- <notheme if="$host = 'localhost:8080'" /> -->
  14.     <notheme if="$ajax_load"/>
  15.     <notheme css:if-not-content="#visual-portal-wrapper"/>
  16.  
  17.     <xi:include href="./includes/_head.xml"/>
  18.  
  19.     <drop if="$hide_subnav" theme="//*[@id = 'navigation-subnavigation']"/>
  20.  
  21.     <xsl:template match="a[@id='portal-logo']">
  22.         <xsl:copy>
  23.             <xsl:attribute name="id">logo</xsl:attribute>
  24.             <xsl:apply-templates select="@*[name()!='id']"/>
  25.             <!-- <xsl:apply-templates select="node()"/> -->
  26.         </xsl:copy>
  27.     </xsl:template>
  28.  
  29.     <rules if="//*[contains(@id, 'portal-breadcrumbs')]">
  30.         <after css:theme="#global-navigation">
  31.             <section class="sr-only" id="breadcrumbs">
  32.                 <h5 class="sr-only">Breadcrumbs</h5>
  33.                 <xsl:apply-templates css:select="#breadcrumbs-you-are-here"/>
  34.                 <ol itemscope="" itemtype="http://schema.org/BreadcrumbList">
  35.                     <xsl:for-each css:select="#portal-breadcrumbs ol &gt;*:not(.breadcrumbSeparator) &gt;*:not(.breadcrumbSeparator)">
  36.                         <xsl:variable name="count">
  37.                             <xsl:value-of select="position()"/>
  38.                         </xsl:variable>
  39.                         <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
  40.                             <xsl:apply-templates select="."/>
  41.                             <meta content="{$count}" itemprop="position"/>
  42.                         </li>
  43.                     </xsl:for-each>
  44.                 </ol>
  45.             </section>
  46.         </after>
  47.     </rules>
  48.  
  49. <before theme-children="/html/body">
  50.     <xsl:attribute name="class">
  51.         <xsl:value-of select="/html/body/@class" />
  52.         <xsl:if css:test="body.template-default_error_message"> text</xsl:if>
  53.             <xsl:if css:test="body.template-login_form"> text</xsl:if>
  54.         <xsl:if css:test="body.portaltype-document"> text</xsl:if>
  55.         <xsl:if css:test="body.portaltype-job-offer"> form</xsl:if>
  56.         <xsl:if css:test="body.portaltype-project"> text research</xsl:if>
  57.     </xsl:attribute>
  58. </before>
  59.  
  60.  
  61.  
  62.  
  63.  
  64.   <theme href="./static/theme.html"/>
  65.   <replace css:theme-children="div#wrapper">
  66.     <xsl:apply-templates css:select="nav#mp-menu"/>
  67.     <section class="scroller">
  68.       <div class="overlay-inner"/>
  69.       <xsl:apply-templates css:select="section#cookie-container"/>
  70.       <xsl:apply-templates css:select="section#meta"/>
  71.       <section id="global-navigation">
  72.         <div class="container">
  73.           <nav role="navigation">
  74.             <div>
  75.               <xsl:apply-templates css:select="#portal-logo"/>
  76.             </div>
  77.             <div class="row">
  78.               <div class="md">
  79.                 <ul class="language-select">
  80.                   <xsl:apply-templates select="//ul[@class = 'language-select']/li"/>
  81.                 </ul>
  82.                 <button class="btn-slash btn-icon-menu navbar-toggle collapsed" data-target="#mlpm" data-toggle="collapse" id="mlpm-trigger" type="button">
  83.                   <span class="icon"/>Menu</button>
  84.               </div>
  85.               <ul class="nav navbar-nav">
  86.                 <xsl:apply-templates select="//ul[@id = 'portal-globalnav']/li"/>
  87.               </ul>
  88.             </div>
  89.           </nav>
  90.         </div>
  91.       </section>
  92.       <xsl:apply-templates css:select="section#breadcrumbs"/>
  93.  
  94.  
  95. <xsl:if test="/html/body[contains(concat(' ', normalize-space(@class), ' '),' portaltype-collection ')]">
  96.     <xsl:if test="/html/body[contains(concat(' ', normalize-space(@class), ' '),' template-pressrelease_list ')] or
  97.                  /html/body[contains(concat(' ', normalize-space(@class), ' '),' template-projects-listing_without-filter ')]">
  98.         <xi:include href="./includes/collection.xml" />
  99.     </xsl:if>
  100.     <xsl:if test="/html/body[contains(concat(' ', normalize-space(@class), ' '),' template-person_grouped_view ')]">
  101.         <xi:include href="./includes/person-grouped.xml"/>
  102.     </xsl:if>
  103.  
  104.   <append css:theme="body">3</append>
  105. </xsl:if>
  106.  
  107.       <xsl:apply-templates css:select="footer#portal-footer"/>
  108.       <xsl:apply-templates css:select="footer#meta-footer"/>
  109.     </section>
  110.   </replace>
  111. </rules>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement