Foundry support for ccm-types-bookmark
git-svn-id: https://svn.libreccm.org/ccm/trunk@2962 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c071040215
commit
b94756f723
|
|
@ -17,6 +17,9 @@
|
|||
<content-item content-type="com.arsdigita.cms.contenttypes.Article">
|
||||
content-items/article-detail.xml
|
||||
</content-item>
|
||||
<content-item content-type="com.arsdigita.cms.contenttypes.Bookmark">
|
||||
content-items/bookmark-detail.xml
|
||||
</content-item>
|
||||
<content-item content-type="com.arsdigita.cms.contenttypes.NewsItem">
|
||||
content-items/news-detail.xml
|
||||
</content-item>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
version="2.0">
|
||||
|
||||
<xsl:import href="content-items/article.xsl"/>
|
||||
<xsl:import href="content-items/bookmark.xsl"/>
|
||||
<xsl:import href="content-items/news.xsl"/>
|
||||
<xsl:import href="content-items/assets/image-attachments.xsl"/>
|
||||
<xsl:import href="content-items/assets/notes.xsl"/>
|
||||
|
|
@ -539,4 +540,19 @@
|
|||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="content-item-layout//show-property">
|
||||
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||
<xsl:variable name="name" select="./@name"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$contentitem-tree/*[name() = $name]">
|
||||
<xsl:value-of select="$contentitem-tree/*[name() = $name]"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$contentitem-tree/nav:attribute[@name = $name]">
|
||||
<xsl:value-of select="$contentitem-tree/nav:attribute[@name = $name]"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2014 Jens Pelzetter for the LibreCCM Foundation
|
||||
|
||||
This file is part of the Foundry Theme Engine for LibreCCM
|
||||
|
||||
Foundry is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Foundry is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foundry If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||
xmlns:foundry="http://foundry.libreccm.org"
|
||||
xmlns:nav="http://ccm.redhat.com/navigation"
|
||||
xmlns:ui="http://www.arsdigita.com/ui/1.0"
|
||||
exclude-result-prefixes="xsl xs bebop cms foundry nav ui"
|
||||
version="2.0">
|
||||
|
||||
<xsl:template match="/content-item-layout//bookmark-description">
|
||||
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$contentitem-tree/description">
|
||||
<xsl:value-of select="$contentitem-tree/description"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$contentitem-tree/nav:attribute[@name = 'description']">
|
||||
<xsl:value-of select="$contentitem-tree/nav:attribute[@name = 'description']"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/content-item-layout//bookmark-link">
|
||||
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||
|
||||
<xsl:apply-templates>
|
||||
<xsl:with-param name="href" tunnel="yes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$contentitem-tree/url">
|
||||
<xsl:value-of select="$contentitem-tree/url"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$contentitem-tree/nav:attribute[@name = 'url']">
|
||||
<xsl:value-of select="$contentitem-tree/nav:attribute[@name = 'url']"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/content-item-layout//bookmark-url">
|
||||
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$contentitem-tree/url">
|
||||
<xsl:value-of select="$contentitem-tree/url"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$contentitem-tree/nav:attribute[@name = 'url']">
|
||||
<xsl:value-of select="$contentitem-tree/nav:attribute[@name = 'url']"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<content-item-layout>
|
||||
<h2>
|
||||
<bookmark-link>
|
||||
<a>
|
||||
<content-item-title/>
|
||||
</a>
|
||||
</bookmark-link>
|
||||
</h2>
|
||||
<div>
|
||||
<bookmark-description/>
|
||||
</div>
|
||||
</content-item-layout>
|
||||
Loading…
Reference in New Issue