You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by H....@MI.unimaas.nl on 2004/07/07 11:42:10 UTC

Site navigation and cocoon pipelines, help!

Hi,

I'm running around in circles here and cannot think of an elegant solution.
I hope someone can help.

Situation:

my project is all in a subdirectory with subsitemap of /cocoon under Tomcat.
In fact I renamed /cocoon to /ROOT so my project's homepage is under
http://localhost:8080/myproject/.

I cannot use relative urls to the various pages, since I have a menubar on
each page, and I also don't want to include the full directorypath
(including the projectname). So I added a baseurl tag to the html-output.

I now run into the problem that I cannot get a <a href="#top"> working. It
either goes to <baseurl>/#top or to <original url>/#top but with an error
that there is no pipeline for this url.

Who knows an elegant solution?

Bye, Helma


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Site navigation and cocoon pipelines, help!

Posted by "Volkm@r" <pl...@arcor.de>.
H.vanderLinden@MI.unimaas.nl wrote:
> Hi,
> 
> I'm running around in circles here and cannot think of an elegant solution.
> I hope someone can help.
> 
> Situation:
> 
> my project is all in a subdirectory with subsitemap of /cocoon under Tomcat.
> In fact I renamed /cocoon to /ROOT so my project's homepage is under

This makes http://localhost:8080/ link to Cocoon, right?

> http://localhost:8080/myproject/.
> 
> I cannot use relative urls to the various pages, since I have a menubar on
> each page, and I also don't want to include the full directorypath
> (including the projectname). So I added a baseurl tag to the html-output.
> 

I think you need to use a HostMatcher or a HostSelector.

Recently I made an installation with several subdirectories that are 
served as virtual hosts.  So I have:
    http://cocoon:8080/     served from /opt/VirtHosts/cocoon
    http://virthost1:8080/              /opt/VirtHosts/virthost1
    http://virthost2:8080/              /opt/VirtHosts/virthost2
    http://virthost3:8080/              /opt/VirtHosts/virthost3

First part of this configuration is described in: 
<http://wiki.apache.org/cocoon/Cocoon2_2e1_2e4EasyInstallation>.

In sitemap.xmap of /opt/cocoon, I have put the HostMatcher

    <map:match pattern="*:**" type="host">
      <map:mount check-reload="yes" src="/opt/VirtHosts/{1}/" 

                 uri-prefix=""/>
    </map:match>
    <map:match pattern="*" type="host">
      <map:mount check-reload="yes" src="/opt/VirtHosts/{1}/"
                 uri-prefix=""/>
    </map:match>

directly at the very beginning of the main <map:pipeline>. This matcher 
should be defined in the components section before.

    <map:matchers default="wildcard">
    ...
      <map:matcher logger="sitemap.matcher.host" name="host"
        src="org.apache.cocoon.matching.WildcardHostMatcher"/>
    ...
    </map:matchers>

Maybe you can use this example to find a solution for your own 
configuration. Although mine is Linux, it should work with Windows as well.

-- 
Volkmar W. Pogatzki


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org