|
|
Choosing A Webhost: |
svn commit: r349588 - in /lenya/trunk/src/webapp: global-sitemap.xmap lenya: msg#00098cms.lenya.cvs
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 -->
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | svn commit: r349410 - /lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/info/root.xsl, michi |
|---|---|
| Next by Date: | svn commit: r349988 - /lenya/branches/BRANCH_1_2_X/src/webapp/lenya/info.xmap, edith |
| Previous by Thread: | svn commit: r349410 - /lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/info/root.xsl, michi |
| Next by Thread: | svn commit: r349988 - /lenya/branches/BRANCH_1_2_X/src/webapp/lenya/info.xmap, edith |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |