You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ch...@apache.org on 2005/11/29 03:07:49 UTC
svn commit: r349588 - in /lenya/trunk/src/webapp: global-sitemap.xmap
lenya/resources-shared.xmap
Author: chestnut
Date: Mon Nov 28 18:07:44 2005
New Revision: 349588
URL: http://svn.apache.org/viewcvs?rev=349588&view=rev
Log:
added ability to request shared resources [js or css] inherited [or ancestor] from templated pubs
ex: page.css
@import url(page.inherited.css);
/* pub specific css */
Modified:
lenya/trunk/src/webapp/global-sitemap.xmap
lenya/trunk/src/webapp/lenya/resources-shared.xmap
Modified: lenya/trunk/src/webapp/global-sitemap.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/global-sitemap.xmap?rev=349588&r1=349587&r2=349588&view=diff
==============================================================================
--- lenya/trunk/src/webapp/global-sitemap.xmap (original)
+++ lenya/trunk/src/webapp/global-sitemap.xmap Mon Nov 28 18:07:44 2005
@@ -413,6 +413,15 @@
<map:parameter name="type" value="file"/>
<map:mount uri-prefix="" src="{fallback://lenya/resources-shared.xmap}" check-reload="true" reload-method="synchron"/>
</map:act>
+ <!-- Ancestors resources, css, js, etc... -->
+ <!-- {publication-id}/{area}/{filename}.inherited.{extention} -->
+ <map:match pattern="*/*/**.inherited.*">
+ <map:act type="resource-exists-enhanced">
+ <map:parameter name="url" value="template-fallback://resources/shared/{3}.{4}"/>
+ <map:parameter name="type" value="file"/>
+ <map:mount uri-prefix="" src="{fallback://lenya/resources-shared.xmap}" check-reload="true" reload-method="synchron"/>
+ </map:act>
+ </map:match>
</map:match>
<!-- Enter the actual publication -->
Modified: lenya/trunk/src/webapp/lenya/resources-shared.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/resources-shared.xmap?rev=349588&r1=349587&r2=349588&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources-shared.xmap (original)
+++ lenya/trunk/src/webapp/lenya/resources-shared.xmap Mon Nov 28 18:07:44 2005
@@ -24,6 +24,19 @@
<!-- Lenya Publications -->
+ <!-- only look for inherited css ex: default.css -> @import url(default.inherited.css); -->
+ <!-- matches pub-id/area/css/*.inherited.css -->
+ <map:match pattern="*/*/css/*.inherited.css">
+ <map:act type="resource-exists" src="template-fallback://resources/shared/css/{3}.xml">
+ <map:generate src="template-fallback://resources/shared/css/{../3}.xml"/>
+ <map:transform src="template-fallback://resources/css/css.xsl">
+ <map:parameter name="contextprefix" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="text" mime-type="text/css"/>
+ </map:act>
+ <map:read src="template-fallback://resources/shared/css/{3}.css" mime-type="text/css" />
+ </map:match>
+
<!-- matches pub-id/area/css/*.css -->
<map:match pattern="*/*/css/*.css">
<!-- Only called if a {3}.css exists because of resource-exists-enhanced before -->
@@ -35,6 +48,11 @@
<map:serialize type="text" mime-type="text/css"/>
</map:act>
<map:read src="fallback://resources/shared/css/{3}.css" mime-type="text/css" />
+ </map:match>
+
+ <!-- matches pub-id/area/javascript/**.inherited.js -->
+ <map:match pattern="*/*/javascript/**.inherited.js">
+ <map:read src="template-fallback://resources/shared/javascript/{3}.js" mime-type="application/x-javascript" />
</map:match>
<!-- matches pub-id/area/javascript/**.js -->
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org