Ross Gardler wrote:
Helena Edelson wrote:
Helena Edelson wrote:
Hi,
I am trying to set up a test where if the request URI is {project
home}/index.html
override skinning that page using site2html.xsl with another
modified version of the file.
I see in main/webapps/sitemap.xmap 2 pipelines pertaining to
skinning and wonder
where to add the test in my project sitemap and set the modified
site2html for the final skinning of the "home" page,
and how to construct the statement.
[snippet from main/webapps/sitemap.xmap]
<map:pipeline internal-only="false">
<!--pipeline that "marries" the docs in the root dir with the skin
to produce html-->
<map:match pattern="*.html">
<map:aggregate element="site">
<map:part src="cocoon:/skinconf.xml"/>
<map:part src="cocoon:/build-info"/>
<map:part src="cocoon:/tab-{0}"/>
<map:part src="cocoon:/menu-{0}"/>
<map:part src="cocoon:/body-{0}"/>
</map:aggregate>
<map:call resource="skinit">
<map:parameter name="type" value="site2xhtml"/>
<map:parameter name="path" value="{0}"/>
</map:call>
</map:match>
kind regards,
helena
Here is an example of the current index pipeline:
<map:match pattern="index.xml">
<map:call resource="all-articles-aggregator-resourse"/>
<map:transform
src="{project:resources.stylesheets}/index.xsl"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
when I insert this above the inital resource, it appears you must
declare "skinit" somewhere.
any idea where?
<map:call resource="skinit">
<map:parameter name="type" value="index2xhtml"/>
<map:parameter name="path" value="{0}"/>
</map:call>
I'm a little confused by what you have actually done here. What you
should do is:
1. create an empty project sitemap (if you seeded your site when
creating it using forrest you will already have a simple example one)
2. Add your match to the map:patterns part of the sitemap
3. add your resource to the project sitemap
That is it.
You should *not* be copying anything from the core sitemap into your
project sitemap. If your project sitemap does not process a request it
will fall through to the core sitemap.
Ross
To rephrase the question:
What do you need to do in sitemap to override using site2xhtml.xsl for
one page request only, and implement another
skin stylesheet of type <xsl:template match="site"> ?
this is my current index.xml file entry in sitemap using a custom
{project.resources-dir}/stylesheets/index.xsl
for custom output but the framework around it needs to be in a modified
skin as well.
I can add this as a howto later for projects needing a special homepage
layout if desired.
<map:match pattern="index.xml">
<map:call resource="all-articles-aggregator-resourse"/>
<map:transform
src="{project:resources.stylesheets}/index.xsl">
<map:parameter name="entries" value="1"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>